Categories | Question details Back To List | ||
Grid dynamic loading with remote filter & remote sort I'm using Grid Component for approx. 3k Entries, hence i'm using dataprocessor with daynamic loading. All fine so far, but any filters created using <code>myGrid.attachHeader("#text_filter,#combo_filter,#numeric_filter");</code> just operate on local data... my idea was to override the filter method and reload the contents with additional custom params, like: <pseudocode> dhtmlXGridObject.prototype.filterTreeBy=function(column, value, preserve){ // no idea how to implement similar behaviour // actually any possibility to pass custom params to the DP would do the job myGrid.myDataProcessorReloadByConfig( myPataProcessor, {filter: {column: "name", operand: "like", value: "Andy%" }, limit: 50, offset: 300}); } </pseudocode> // of course i'd also need remote sorting 8) maybe soneone has an Idea or Hint to implement "remote Filtering" & "remote Sort" for dhtmlX Grid Component many Thanx in advance Answer posted by Support on Nov 05, 2008 09:57 The rough solution can be checked here. http://dhtmlx.com/docs/products/dhtmlxGrid/doc/step-by-step/ch_biggrid.html#grid_sbs_biggrid In case of built in filters, it may look as grid.attachEvent("onFilterStart",function(cols,vals){ var data=[]; for (var i=0; i<cols.length; i++) data.push(cols[i]+"="+vals[i]); grid.clearAll(); grid.loadXML("some.php?mode=filter&"+data.join("&")); return false; //block default filters }); as result , each time when filter triggered, it will cause grid reloading from some URL, all filter values included in URL, so they will be accessible on server side. Answer posted by redgrey on Nov 05, 2008 15:25 exactly what i was looking for. thanks for the great help |