jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Search by filter vitualmode
This topic contains 4 replies, has 2 voices, and was last updated by nguyentran 11 years, 7 months ago.
-
Author
-
Hello.
I have 1 gridview like that :
https://lh6.googleusercontent.com/-_wzSIAE-NaQ/UoGvT6JBt8I/AAAAAAAAAEg/eEvdeZPnHo8/w836-h330-no/gridview.pngbefore 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 !!!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 StoevjQWidgets Team
http://www.jqwidgets.com/okay. can you help me export all data in table in vitualMode. gridview only export current page
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 StoevjQWidgets Team
http://www.jqwidgets.com/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
-
AuthorPosts
You must be logged in to reply to this topic.