1. #1
    Ext User
    Join Date
    Oct 2007
    Posts
    14
    Vote Rating
    0
    eviltofu is on a distinguished road

      0  

    Cool How do I select a row in a grid programmatically?

    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();
    gridSelectionModel.select(model,false);

    Any pointers/hints?

  2. #2
    Sencha User
    Join Date
    Mar 2012
    Posts
    1
    Vote Rating
    0
    jzgxt is on a distinguished road

      0  

    Default


    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).

  3. #3
    Sencha User
    Join Date
    Jun 2009
    Posts
    1
    Vote Rating
    0
    ashishgarwal is on a distinguished road

      0  

    Default


    Quote Originally Posted by jzgxt View Post
    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).

    Can you pl share your fix?

Similar Threads

  1. Programmatically Select TreeNode
    By kgmoney in forum Ext 2.x: Help & Discussion
    Replies: 7
    Last Post: 8 Feb 2013, 5:16 AM
  2. ListView multi selection - select items programmatically
    By msimone in forum Ext GWT: Discussion
    Replies: 8
    Last Post: 17 Dec 2010, 8:42 AM
  3. Desktop Example - How to Show/Hide Grid Window with id 'grid-win' programmatically
    By Venkateswara Rao in forum Ext 3.x: Help & Discussion
    Replies: 6
    Last Post: 5 Oct 2010, 6:00 PM
  4. Programmatically Select Items in ItemSelector
    By ExtJSBeginner in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 14 Jun 2010, 2:37 PM
  5. select node programmatically.
    By xerifa in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 26 May 2008, 8:48 PM

Thread Participants: 2

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar