jQuery UI Widgets Forums Grid Row filter problem

This topic contains 3 replies, has 3 voices, and was last updated by  Peter Stoev 9 years, 5 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Row filter problem #69331

    msahyilmaz
    Participant

    Hi, i have a jqx grid and selectionmode is checkbox.

    I am doing the following;
    1- I do before the first election.
    2- I’m filtering.
    3- I select a row in the incoming data

    I chose the value of this data before filtering the results “null” is coming.
    What am I doing wrong?

    Row filter problem #69334

    Nadezhda
    Participant

    Hello msahyilmaz,

    Please, find a working example below where ‘showfilterrow’ property is set to true and ‘selectionmode’ property is set to checkbox. If this does not help, please provide us with a code sample we can test to determine the source of the issue.

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <title></title>
        <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" />
        <script type="text/javascript" src="../../scripts/jquery-1.11.1.min.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxdata.js"></script> 
        <script type="text/javascript" src="../../jqwidgets/jqxbuttons.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxscrollbar.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxmenu.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxgrid.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxgrid.sort.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxgrid.filter.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxgrid.selection.js"></script> 
        <script type="text/javascript" src="../../jqwidgets/jqxpanel.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxcheckbox.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxlistbox.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxdropdownlist.js"></script>
        <script type="text/javascript">
            $(document).ready(function () {       
                var url = "../sampledata/orders.xml";
    
                // prepare the data
                var source =
                {
                    datatype: "xml",
                    datafields: [
                        { name: 'ShippedDate', map: 'm\\:properties>d\\:ShippedDate', type: 'date' },
                        { name: 'Freight', map: 'm\\:properties>d\\:Freight', type: 'float' },
                        { name: 'ShipName', map: 'm\\:properties>d\\:ShipName', type: 'string' },
                        { name: 'ShipAddress', map: 'm\\:properties>d\\:ShipAddress', type: 'string' },
                        { name: 'ShipCity', map: 'm\\:properties>d\\:ShipCity', type: 'string' },
                        { name: 'ShipCountry', map: 'm\\:properties>d\\:ShipCountry', type: 'string' }
                    ],
                    root: "entry",
                    record: "content",
                    id: 'm\\:properties>d\\:OrderID',
                    url: url
                };
                var dataAdapter = new $.jqx.dataAdapter(source);
    
                // create jqxgrid.
                $("#jqxgrid").jqxGrid(
                {
                    width: 850,
                    height: 450,
                    source: dataAdapter,
                    showfilterrow: true,
                    sortable: true,
                    filterable: true,
                    selectionmode: 'checkbox',
                    altrows: true,
                    columns: [
                      { text: 'Ship Name', datafield: 'ShipName', width: 250 },
                      { text: 'Shipped Date', datafield: 'ShippedDate', width: 100, cellsformat: 'yyyy-MM-dd' },
                      { text: 'Freight', datafield: 'Freight', width: 150, cellsformat: 'F2', cellsalign: 'right' },
                      { text: 'Ship City', datafield: 'ShipCity', width: 150 },
                      { text: 'Ship Country', datafield: 'ShipCountry'}
                   ]
                });
            });
        </script>
    </head>
    <body class='default'>
        <div id='jqxWidget' style="font-size: 13px; font-family: Verdana; float: left;">
            <div id="jqxgrid">
            </div>
        </div>
    </body>
    </html>

    Best Regards,
    Nadezhda

    jQWidgets team
    http://www.jqwidgets.com/

    Row filter problem #69343

    msahyilmaz
    Participant

    Hi nadezhda,

    Here is my code:Click Here
    Here is what i am doing:Youtube Video

    Row filter problem #69409

    Peter Stoev
    Keymaster

    Hi msahyilmaz,

    We do not find a problem related to jqxGrid’s basic functionality in this code. The problem is in the custom Selection code written in your fiddle. It’s wrong to use “uid” for Row Selection. Row’s Bound Index is expected as Function parameter.

    Regards,
    Peter Stoev

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

You must be logged in to reply to this topic.