|
Title: Dynamic data option in filter datagrid Post by: acreonte82 on May 09, 2014, 07:09:25 AM Hello to all,
when we define the filter in datagrid we also have to define the value will be present in a combobox filter Code: $('#laboratory_result').datagrid({remoteFilter:true}); At the moment I created a php script that return to me a json string with the grouped values The question is easy: how can I integrate all? who can help me? Title: Re: Dynamic data option in filter datagrid Post by: acreonte82 on May 12, 2014, 12:46:08 AM stworthy can u help me?
Title: Re: Dynamic data option in filter datagrid Post by: stworthy on May 12, 2014, 01:31:57 AM To let combobox retrieve data from remote server, simply set the specified 'url' property.
Code: $('#laboratory_result').datagrid('enableFilter',[Title: Re: Dynamic data option in filter datagrid Post by: acreonte82 on May 13, 2014, 12:20:00 AM Ok I need a vacation....
A last question: if I want to reload the data in the combobox after I reset the filter (selecting the option 'All')? This is to update the possibile value of filter.. Thanks Title: Re: Dynamic data option in filter datagrid Post by: acreonte82 on May 14, 2014, 06:54:37 AM stworthy?
Title: Re: Dynamic data option in filter datagrid Post by: stworthy on May 14, 2014, 07:39:58 AM Don't understand your question clearly. Maybe you need to explain it in more detail.
Title: Re: Dynamic data option in filter datagrid Post by: acreonte82 on May 16, 2014, 12:29:35 AM The scenario, of my case , is this:
- I have a datagrid with some medical results and in this datagrid I defined a personal comands to manage the data (update/delete/standby); - each columns have a filter and one have combobox filter . The grouped values, of this combobox, are loaded from a php script (a dynamic value) For example: if I show the medical result , selected from a value defined in the combobox , and then I deleted all results , I want to reload the filter values of the combobox. So the system show me the remaining possible values of filter loaded from a php script. The question is: how I can force the reload of the combobox filter? Title: Re: Dynamic data option in filter datagrid Post by: stworthy on May 16, 2014, 02:10:59 AM To reload the data of combobox filter component, call 'getFilterComponent' method to get this object and then call 'reload' method on it.
Code: var cc = $('#dg').datagrid('getFilterComponent', 'type_of_result');Title: Re: Dynamic data option in filter datagrid Post by: acreonte82 on May 16, 2014, 02:50:37 AM Thanks!
|