Dhtmlxgrid connector does not refresh combo

Hi there,

I would like to confirm whether this is a bug or just due to limited functionality and we need to find a way round, or whether I am doing something wrong:

I have a product grid that uses PHP connector to load data, inside this grid there are two combos, which are loaded thorough the connector and bring up categories and brands selection.

I use the OptionsConnector() to get the up-to-date list of categories & brands for my product grid from the database (mysql).

Now when I add / edit / delete a brand / category thorough a dhtmlxform, I use the following code to refresh the product grid so the category & brand combos inside the grid are updated:

grid_prd.clearAndLoad(“codebase/php/grid-prd.php”);

But unfortunately the above clearAndLoad() method does not update the Category & Brand combos inside product grid.

Now I want to know:

Is it that I should be using a different method to refresh the grid? Or this is a temporary bug and you can provide a fix? Or the grid only can refresh its items’ data (as in the products) and it can never update the selection inside the combos and I need to do some extra coding for that?

If it is the last one, could you please provide a sample on how I can refresh a combo inside a grid that uses connector to get data? As I cannot find anything in your documentation.

Thank you

This is known limitation. Currently grid preserves content of collections and reloads only data.
If you want to reload all collections as well, change the reloading code in the next way:

grid_prd._colls_loaded = false; grid_prd.clearAndLoad("codebase/php/grid-prd.php");

Fantastic!

Thank you very much that line of code did the job! Thanks for the fast reply :slight_smile:

Great! Stanislav

Thanks