0
votes

I have a grid panel that is instantiated on multiple tabs. Each instance of the grid panel has the same columns, but different data. I am trying to use a state manager to save the column settings like column order, and width.

The problem is that ExtJs saves the column's (generated)id in the database for the first tab, and the next tab generates new ids for the columns and can't find state information in the database for those new values. So I can't save and load stateful information.

Edit: I tried using itemIds instead of ids because itemIds are contained within the container so it won't be duplicate id if on multiple tabs. But Ext seems to generate ids if ids are not present, regardless of the itemId property. I added this part in case it gives a better view of what I'm trying to accomplish: The database needs for all tables to have the same id, but Ext needs for them to be different.

1
are your columns expected to be the same across tabs? Which state manager r u using? - dbrin
@dbrin My columns are going to be the same across tabs. I am using a custom state manager. - LawZero

1 Answers

1
votes

The way that I have gotten around this in the past has been like this...

    id: 'tab_panel_'+this.somthing_that_is_unique_like_a_table_name

which gives me something like this...

    <div id='tab_panel_my_first_table'>other information</div>
    <div id='tab_panel_my_second_table'>other information</div>