Results 1 to 2 of 2

Thread: [OPEN-EXTJSIV-1805]Grid selection model

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    May 2009
    Posts
    91

    Default [OPEN-EXTJSIV-1805]Grid selection model

    I think it is undocumented how the selection models work in ExtJS4 grids.

    From Ext.panel.Table.getSelectionModel() I figured out that the way to configure the selection model of a grid is like this:
    Code:
    selModel: {
    	selType: 'RowModel',
    	mode: 'MULTI',
    	allowDeselect: true
    }
    This fails with an error:
    'selection.RowModel' is a singleton and cannot be instantiated
    which is done in this line:
    Code:
    this.selModel = Ext.create('selection.' + type, this.selModel);
    The very similar code in Ext.view.AbstractView.getSelectionModel() uses this line:
    Code:
    me.selModel = Ext.create('Ext.selection.DataViewModel', me.selModel);
    So I suspect there is something wrong here. Maybe just someone forgot the "Ext.", maybe there's more to it. (I cannot tell because I don't know how ExtJS4 selection models are supposed to work.)

  2. #2
    Sencha User
    Join Date
    Jun 2008
    Posts
    2

    Default

    I run into the same issue. It seems to be working when you remove the selType and leave just

    Code:
    selModel: {
    	mode: 'MULTI',
    	allowDeselect: true
    }

Similar Threads

  1. Replies: 9
    Last Post: 28 Nov 2012, 3:00 AM
  2. Replies: 12
    Last Post: 23 Aug 2011, 8:02 AM
  3. Replies: 2
    Last Post: 13 Jun 2011, 1:56 PM
  4. Replies: 0
    Last Post: 11 Apr 2011, 10:41 AM
  5. Replies: 1
    Last Post: 31 Mar 2011, 3:01 PM

Posting Permissions

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