30 Jan 2011 5:29 AM #1
How do I select a row in a grid programmatically?
How do I select a newly added row in a grid programmatically after I add in it?
I've tried using the following but nothing was selected.
ModelData model = getDefaultModel(); // get a new default model
Grid<ModelData> grid = getGrid(); // grid with remote data
ListStore<ModelData> listStore = grid.getStore();
// code that adds the model to the remote data store
listStore.add(model); // I don't want to reload everything just for adding this one thing
GridSelectionModel<ModelData> gridSelectionModel = grid.getSelectionModel();
28 Mar 2012 8:22 AM #2
I run into the same problem. After calling selectionModel.select(desiredRowIndex, false), I cannot see the RowClick event get fired. I resolved this issue by calling the code inside the event handler of RowClick right after calling selectionModel.select(desiredRowIndex, false).
23 Oct 2012 4:07 AM #3
By kgmoney in forum Ext 2.x: Help & DiscussionReplies: 7Last Post: 8 Feb 2013, 5:16 AM
By msimone in forum Ext GWT: DiscussionReplies: 8Last Post: 17 Dec 2010, 8:42 AM
By Venkateswara Rao in forum Ext 3.x: Help & DiscussionReplies: 6Last Post: 5 Oct 2010, 6:00 PM
By ExtJSBeginner in forum Ext 3.x: Help & DiscussionReplies: 1Last Post: 14 Jun 2010, 2:37 PM
By xerifa in forum Ext 2.x: Help & DiscussionReplies: 1Last Post: 26 May 2008, 8:48 PM