Results 1 to 4 of 4

Thread: How to get the ROW from gridpanel?

  1. #1
    Sencha User
    Join Date
    May 2013
    Posts
    24
    Vote Rating
    0
      0  

    Default Unanswered: How to get the ROW from gridpanel?

    Below line is not working to select row from gridPanel.

    var rowToHighlight=Ext.get(grid.view.getRow(rowIndex));

  2. #2
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    1,099
    Answers
    113
    Vote Rating
    100
      0  

    Default

    what exactly do you want to do? The selection model might help you:

    http://docs.sencha.com/extjs/4.2.0/#...election.Model

    E.g. if you want to get the selected row(s):

    Code:
    var sRows = grid.getSelectionModel().getSelection();
    or if you want to set the selection programmatically:
    Code:
    var index = 0;
    grid.getSelectionModel().select(index);  // select record by index
    
    var record = grid.getStore().first();
    grid.getSelectionModel().select(record);  // select record

  3. #3
    Sencha User
    Join Date
    May 2013
    Posts
    24
    Vote Rating
    0
      0  

    Default Undefined result.

    I use both the code line but result is UnDefined.

  4. #4
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    1,099
    Answers
    113
    Vote Rating
    100
      0  

    Default

    what is undefined? do you have the grid visible in this scope? if you are using an id in your grid, then you can try Ext.getCmp('gridID').getSelectionModel()....

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •