Remove old id's from a grid after reload an updated xml file

Hi,

How can i reload a grid with an updated xml file and automatically remove the items which are not in the xml file anymore based on the given id.

I now use the method load(“some_file.php”,“xml”) which leaves de old items in the grid.

Regards,

William

Unfortunately there is no way to update and delete missed items in the same time.
You can fully reload component by using

some.clearAll(); some.load(new_data_url);

Hi Stanislav,

Thanks for your reply.

Unfortunately this causes flashing of the entire grid.

Is it possible to create an hidden column in de grid with the id active for example.

Then before loading the new xml data store active = 0 in the hidden column for all rows.
Load the xml data with active = 1 for the hidden column.
After loading the new xml data remove all rows where active = 0.

I can’t find any way to create hidden columns in dhtmlx touch.

Regards,

William

Hi,

there is no need to create hidden columns. Data items of Grid may have any number of properties, and it is not necessary that all of them are displayed in columns. All item properties can be got like so:

var item = grid.item(itemId);
var active = item.active;