Page 1 of 1

Update combo filter field with new values

Posted: Tue Mar 28, 2023 2:06 pm
by jmbartel

This is a pretty simple question that I can't seem to find an answer for. Is there a way to update the values available to choose from in a combo filter for a column in a grid? I'm currently loading the data using a synchronous call before the grid loads, but i want to switch to async and load it after the grid has been loaded. Is that possible?


Re: Update combo filter field with new values

Posted: Tue Mar 28, 2023 2:13 pm
by Animal

Configure the combo's store with a URL (and autoLoad : true) and it will load itself on instantiation.


Re: Update combo filter field with new values

Posted: Tue Mar 28, 2023 2:16 pm
by jmbartel

What if I want to update it after the grid is loaded - say a column is updated with a new value and it needs to be included in the combo filter?


Re: Update combo filter field with new values

Posted: Tue Mar 28, 2023 9:35 pm
by marcio

Hey jmbartel

Using the store as Animal suggested - If you want to retrieve the data again from the backend, you can use https://bryntum.com/products/grid/docs/api/Core/data/AjaxStore#function-load

If you just want to add records to the store without re-calling the URL, you can use https://bryntum.com/products/grid/docs/api/Core/data/AjaxStore#function-insert or https://bryntum.com/products/grid/docs/api/Core/data/AjaxStore#function-add