View Full Version : Traversing Editor grid Panel

11 Sep 2008, 6:57 AM

I have a EditorGridPanel that has 3 rows and 4 columns each cell has a different combobox these combos are populated using datastores.

How do I traverse through each cell to get the value in that cell?

11 Sep 2008, 7:18 AM
Iterate through the records in the grid's store.

11 Sep 2008, 8:33 PM

I am iterating using the mechanism grid.getView().getCell(0,0).textContext, but this does not work in IE browser but works fine in Mozilla.

I have also tried grid.getView().getCell(0,0).innerHTML, this works fine in both browsers,but the only problem here is that in IE if the combobox has focus the selected value is not available in the innerHTML.

If this way is wrong let me know how to iterate record in the grid store becuase each cell has different stores and in some cells the stores are shared.

11 Sep 2008, 8:35 PM
As @devnull has suggested, you need to traverse the grid store. You have a store defined for the grid right? The grid store will only contain the selected value of the combobox.

11 Sep 2008, 9:48 PM

Store has commitChanges method, how can I undo the changes or set to '' once they are committed.

I have tried rejectChanges() but it does not clear the committed changes. I want to clear all the grid after commitChanges().

I am using commitChanges because in IE the last combobox that gets edited, its value is not available in the datastore