jQuery UI Widgets Forums Grid Search by filter vitualmode

This topic contains 4 replies, has 2 voices, and was last updated by  nguyentran 10 years, 3 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • Search by filter vitualmode #32428

    nguyentran
    Member

    Hello.
    I have 1 gridview like that :
    https://lh6.googleusercontent.com/-_wzSIAE-NaQ/UoGvT6JBt8I/AAAAAAAAAEg/eEvdeZPnHo8/w836-h330-no/gridview.png

    before i dont use vitualmode : true . it works
    but now i using vitualmode : true . it not work.

    this is my search code:

    $("#findButton").click(function () {
    $("#jqxgrid").jqxGrid('clearfilters');
    var searchColumnIndex = $("#dropdownlist").jqxDropDownList('selectedIndex');
    var datafield = "";
    switch (searchColumnIndex) {
    <?php
    $i=0;
    foreach($cname as $name){
    echo "case $i: datafield= \"$name\";break;";
    $i++;
    }
    ?>
    }
    var searchText = $("#inputField").val();
    var filtergroup = new $.jqx.filter();
    var filteroperator = 1;
    var filtervalue = searchText;
    var filtercondition = 'contains';
    var filter = filtergroup.createfilter('stringfilter', filtervalue, filtercondition);
    filtergroup.addfilter(filteroperator, filter);
    $("#jqxgrid").jqxGrid('addfilter', datafield, filtergroup);
    // apply the filters.
    $("#jqxgrid").jqxGrid('applyfilters');
    $("#clearButton").show();
    });

    i had try change like: http://www.jqwidgets.com/jquery-widgets-documentation/documentation/phpintegration/php-server-side-grid-paging-and-filtering.htm . Filter in select columns of gridview work but my search filter of me not work
    Thank you !!!

    Search by filter vitualmode #32430

    Peter Stoev
    Keymaster

    Hi nguyentran,

    In Virtual Mode, you cannot use Local Sorting/Filtering. The Data in Virtual Mode is loaded on demand so there is nothing actually to be filtered/sorted. For such implementation, you may look at the Server Sorting with Server Paging or Server Filtering with Server Paging demos.

    Best Regards,
    Peter Stoev

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

    Search by filter vitualmode #32439

    nguyentran
    Member

    okay. can you help me export all data in table in vitualMode. gridview only export current page

    Search by filter vitualmode #32440

    Peter Stoev
    Keymaster

    Hi nguyentran,

    Yes, that is because of the same reason – data is loaded on demand in Virtual mode and that is why it is called virtual mode. The “exportdata” function has a parameter which allows you to pass an Array of Rows to be exported.

    Best Regards,
    Peter Stoev

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

    Search by filter vitualmode #32441

    nguyentran
    Member

    Mean i can’t export all data of table in VirtualMode ??? maybe have another way to do it. I have a large data . Don’t use virtualmode my page load very slow ~4s and ~1.5s with VirtualMode. Help me please

    • This reply was modified 10 years, 3 months ago by  nguyentran.
Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.