Results 1 to 3 of 3

Thread: How to get multiple selections from GridPanel in EXTJS4.0

  1. #1
    Sencha User poojagarg89's Avatar
    Join Date
    Sep 2011
    Location
    Ahmedabad,India
    Posts
    213

    Default Answered: How to get multiple selections from GridPanel in EXTJS4.0

    I have a GridPanel where I want to get the values of multiple selected rows where I used getSelections() method and its giving error that

    Code:
    var l_id=new Array();
    var count=Ext.getCmp('grid1').getSelectionModel().getCount();
    var lst=Ext.getCmp('grid1').getSelectionModel().getSelections();
    ERROR:
    Code:
    Ext.getCmp("grid1").getSelectionModel().getSelections is not a function
    can anyone help me out with the method to be used in place of getSelections() in extjs4.0 version....?

  2. Instead of "getSelections()", you need to use "getSelection()". This will return an array of all of the selected rows.

  3. #2
    Sencha User
    Join Date
    Apr 2011
    Location
    Wisconsin
    Posts
    10
    Answers
    2

    Default

    Instead of "getSelections()", you need to use "getSelection()". This will return an array of all of the selected rows.

  4. #3
    Sencha User poojagarg89's Avatar
    Join Date
    Sep 2011
    Location
    Ahmedabad,India
    Posts
    213

    Default

    hey thankz
    Its working now

Posting Permissions

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