jQWidgets Forums

Forum Replies Created

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts

  • pk
    Participant

    I get that it’s designed this way, and you may not want to change it.
    However, from a user point of view, having a huge performance penalty with just 10 rows of actual data (or even with no data at all) is not “normal”.

    I think an easy improvement would be to warn the user like this:
    If autorowheight MUST have autoheight equal to true, then the grid should throw an error if those parameters are not both equal to true or both false.


    pk
    Participant

    Thank you Hristo. The use of jqx-splitter is a nice suggestion, but in this way I lose the “drag&drop” functionality of jqxDockingLayout (What if I want to drop content inside “Section-B” for example?)
    So, am I correct to assume that this layout isn’t possible with jqxDockingLayout? If so, may I suggest adding support for nested jqxDockingLayouts? That way you’d be able to cover all use cases.


    pk
    Participant

    I am not using any other widgets. Just jqxDockingLayout (for now).
    Does the following picture explain better what I am trying to do?

    https://imgur.com/a/kEI2BYm


    pk
    Participant

    I mention it as a not-expected behaviour. If I want to re-use the records in other parts of my code, my first thought would be to use the dataadapters.records property, not its originaldata, nor the grids ‘getrows’ method.

    As for the sample: The length is 31, because you manually declared the 31th position of the array (leaving all others empty).
    If your code was instead:

    var records = [];
    records.push("Data");
    alert(records.length);

    the length would be properly 1.

    in reply to: Grid, jqx-disableselect Grid, jqx-disableselect #12710

    pk
    Participant

    I was able to narrow it down. It occurs when:
    Grid has groupable:true,
    Using firefox latest version.
    See sample below:

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    <!-- add the jQuery script -->
    <script type="text/javascript" src="scripts/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="jqwidgets/globalization/jquery.global.js"></script>
    <!-- add the jQWidgets framework -->
    <script type="text/javascript" src="jqwidgets/jqx-all.js"></script>
    <!-- add one of the jQWidgets styles -->
    <link type="text/css" href="jqwidgets/styles/jqx.base.css" rel="stylesheet">
    <link rel="stylesheet" href="jqwidgets/styles/jqx.classic.css" type="text/css" />
    <link rel="stylesheet" href="jqwidgets/styles/jqx.fresh.css" type="text/css" />
    <script type="text/javascript">
    $(document).ready(function () {
    $("#datetime").jqxDateTimeInput({ width: '250px', height: '25px', theme: 'classic' });
    prepareGrid();
    });
    function prepareGrid()
    {
    var data = new Array();
    var firstNames =
    [
    "Andrew", "Nancy", "Shelley", "Regina", "Yoshi", "Antoni", "Mayumi", "Ian", "Peter", "Lars", "Petra", "Martin", "Sven", "Elio", "Beate", "Cheryl", "Michael", "Guylene"
    ];
    var lastNames =
    [
    "Fuller", "Davolio", "Burke", "Murphy", "Nagase", "Saavedra", "Ohno", "Devling", "Wilson", "Peterson", "Winkler", "Bein", "Petersen", "Rossi", "Vileid", "Saylor", "Bjorn", "Nodier"
    ];
    var productNames =
    [
    "Black Tea", "Green Tea", "Caffe Espresso", "Doubleshot Espresso", "Caffe Latte", "White Chocolate Mocha", "Cramel Latte", "Caffe Americano", "Cappuccino", "Espresso Truffle", "Espresso con Panna", "Peppermint Mocha Twist"
    ];
    var priceValues =
    [
    "2.25", "1.5", "3.0", "3.3", "4.5", "3.6", "3.8", "2.5", "5.0", "1.75", "3.25", "4.0"
    ];
    for (var i = 0; i < 200; i++) {
    var row = {};
    var productindex = Math.floor(Math.random() * productNames.length);
    var price = parseFloat(priceValues[productindex]);
    var quantity = 1 + Math.round(Math.random() * 10);
    row["firstname"] = firstNames[Math.floor(Math.random() * firstNames.length)];
    row["lastname"] = lastNames[Math.floor(Math.random() * lastNames.length)];
    row["productname"] = productNames[productindex];
    row["price"] = price;
    row["quantity"] = quantity;
    row["total"] = price * quantity;
    data[i] = row;
    }
    var source =
    {
    localdata: data,
    datatype: "array"
    };
    var dataAdapter = new $.jqx.dataAdapter(source);
    $("#grid").jqxGrid(
    {
    width: 670,
    source: dataAdapter,
    theme: 'fresh',
    columnsresize: true,
    groupable: true,
    columns: [
    { text: 'Name', dataField: 'firstname', width: 100 },
    { text: 'Last Name', dataField: 'lastname', width: 100 },
    { text: 'Product', editable: false, dataField: 'productname', width: 180 },
    { text: 'Quantity', dataField: 'quantity', width: 80, cellsalign: 'right' },
    { text: 'Unit Price', dataField: 'price', width: 90, cellsalign: 'right', cellsformat: 'c2' },
    { text: 'Total', dataField: 'total', cellsalign: 'right', minwidth: 100, cellsformat: 'c2' }
    ]
    });
    }
    </script>
    </head>
    <body id="Body">
    <div id="wrapper" >
    <div>
    <div id="datetime"></div>
    </div>
    <div>
    <div id="grid"></div>
    </div>
    </div>
    </body>
    </html>
    in reply to: Grid, jqx-disableselect Grid, jqx-disableselect #12644

    pk
    Participant

    Apparently this only occurs in firefox.
    Solution: change the following in the jqx.base.css

    /*Disable browser selection*/
    .jqx-disableselect
    {
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -o-user-select: none;
    user-select: none;
    }

    to

    .jqx-disableselect
    {
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: -moz-none;
    -o-user-select: none;
    user-select: none;
    }

    Please include this in the next update.
    Thank you

    in reply to: Loading Tabs Dynamically Loading Tabs Dynamically #4273

    pk
    Participant

    Just wanted to add that on the above example, if you wish to clear the div “jqxTabs” and recreate it from scratch, you have to add the following line:
    $("#jqxTabs").removeData().empty();
    Otherwise, the tabs will persist, even if you remove the “ul” and add a new one.

    in reply to: Grid +dynamic rowdetails Grid +dynamic rowdetails #3724

    pk
    Participant

    Thank you Peter for your prompt answer.

Viewing 8 posts - 1 through 8 (of 8 total)