Hello, I am attempting to set up filtering for a smart-render grid. I am having trouble getting it to work. It loads the results dynamically as you scroll, and the sorting works perfectly. I am very pleased with the performance and the product. The filtering is a rather vital part though and I really want it to work properly.
Typing in the filter boxes produces no reaction or XMLHTTPRequest to the server, just nothing happens, and the select filters are not filled with any values.
Here is a screenshot:
img154.imageshack.us/my.php?imag … plehh9.jpg
I did make sure to include the ext/dhtmlxgrid_filter.js and all of the others dhtmlx javascripts (common, grid, gridcell, srnd) as well.
Below is the current javascript code that I am using, please help me identify any issues.
Thank you,
Hugh Lomas
/********************************************************************
var allaccountsdatagrid = new dhtmlXGridObject(‘accountsdatagrid’);
allaccountsdatagrid.setImagePath(‘classes/dhtmlx/dhtmlxGrid/codebase/imgs/’);
allaccountsdatagrid.setHeader(‘Account Name, Cleaned By, Office, Billing, Active, Suspended, Type’);
allaccountsdatagrid.setInitWidths(’, , , , , , ‘);
allaccountsdatagrid.setSkin(‘light’);allaccountsdatagrid.setColTypes(‘Array’);
function sortGridOnServer( indirect, gridObj, direct){
allaccountsdatagrid.clearAll();
allaccountsdatagrid.loadXML( gridQString + ( gridQString.indexOf(’?’) >= 0 ? ‘&’ : ‘?’ ) + ‘orderby=’ + indirect + ‘&direct=’ + direct );
allaccountsdatagrid.setSortImgState( true, indirect, direct );
return false;
}
allaccountsdatagrid.attachEvent(‘onBeforeSorting’, sortGridOnServer );
allaccountsdatagrid.setColSorting( ‘server,server,server,server,server,server,server’ );
allaccountsdatagrid.attachHeader(’#text_filter,#select_filter,#select_filter,#numeric_filter, #select_filter,#select_filter,#select_filter’);
allaccountsdatagrid.enableSmartRendering(true);
allaccountsdatagrid.init();
var gridQString = ‘request/RequestManager.php?request=DataGridAccountsRequest’;allaccountsdatagrid.loadXML( gridQString );
allaccountsdatagrid.loadXML( gridQString );
/***********************************************************
Filter boxes such as #text-filter, #text-search are client-side filters. In order to carry out server-side you should use another approach. Please, see the article in the documentation:
dhtmlxGrid/doc/step-by-step/ch_biggrid.html
or on our web site
dhtmlx.com/docs/products/dht … 50000.html