I have loaded the datastore via SmartRender using Grid. I am going to use the same datastore for dataview. When I do a filter in dataview, I got the items displayed only on the screen and not fully from server. So, is it possible to use the filter option in datastore itself using
data.bind(my_ds, function(data,filter)); if yes, how to use it?. I can’t make it work and there is no examples too.
You can use filter on dataview or datastore level, to filter the already loaded data.
If you need to apply the server side filtering you can use something like
datastore.clearAll();
datastore.load(“some.php?connector=true&dhx_filter[1]=mask&dhx_filter[3]=another”)
in above lines, filtering rules is passed through the url to the server side connector, which will respond with the filtered dataset
But this will clear the master Datastore right?. I don’t want to reload/rewrite the master datastore, instead, I want to show the rows by filtering in dataview.
In above sample, does datastore contains all data from the server side?
In such case you can call datastore.filter which will filter datastore and reflect in dataview the filtered state.
Any example how to use the filter for datastore?
Api is nearly the same as in dataview
store.filter("#fieldname#", value);
Filtering datastore doesn’t load all data from grid if configured with SmartRendering. Is there is any way to achieve it?
If you are using dynamical loading - the only way to filter data is the server side filtering.
If you are using statical loading, any updates in datastore must fully refresh the grid.