0
votes

I am actually having 2 problems, and I will try to address them separately. I have a tabpanel, with a Grid in Tab1. When the tabpanel opens the Grid in Tab1 is populated with data from an AJAX call to a database. Tab1 does not have a close option, so the Grid stays populated and open. I have a rowEditor setup so that when a row in the Grid is double-clicked it opens a new Tab and populates the new tab with a new grid showing detailed content for the clicked record item in the grid from Tab1.

Now, if I double-click a record in the Grid from Tab1, a new tab opens (Tab2) and the details for the record clicked populate in the Tab2 Grid and it works fine. Now if I click another record in the Grid in Tab1, a new tab opens (Tab3) and it populates with detail results for that record clicked from Tab1. Problem is now that Tab3 is open the results for Tab3 have overwritten the results in Tab2. Where has the data I populated into tab2 gone, and how can I make sure to have each new detail record show in each new tab created? It looks like each new tab that is opening is appending the new data on each new tab, and I am getting overwrites.

Ideally I want to have the Grid in Tab1 open with an index of records and each double click on a record opens a new tabpanel with the detail results for that record clicked.

My second problem is that when I close a tab I am finding that the grid in Tab1 is refreshing when I am not telling it to refresh. as a result I am getting errors because I am not passing required parameters for the Grid in Tab1 to refresh.

1

1 Answers

0
votes

My guess is that you have references to the same stores or the same grid config from multiple tabs. Instead what you want to do is to have separate instances of both the grids and the stores in each tab that you open. That way you wont have collisions.

The issue with the grid reloading on tab change is strange as that is not the default behavior. Check your tabpanel config and listeners for any overzealous reloads.