Results 1 to 3 of 3

Thread: newbie question: CheckboxSelectionModel

  1. #1
    Sencha User
    Join Date
    Dec 2009
    Posts
    425

    Question newbie question: CheckboxSelectionModel

    Hi,
    My grid is configured with a CheckboxSelectionModel.
    Can I set the dataIndex of the CheckboxSelectionModel to a boolean column in my Record and expect the records to be checked or unchecked accordingly?

    Or need I must write a on load function on my store and call grid.getSelectionModel().selectRecords?

  2. #2
    Sencha Premium Member steffenk's Avatar
    Join Date
    Jul 2007
    Location
    Haan, Germany
    Posts
    2,675

    Default

    the second. like this in the load handler:
    Code:
    var a = [];
    for (var i=0; i<records.length; i++) {
    	if(records[i].data.selected) {
    		a.push(records[i]);
    	}
    }
    langSm.selectRecords(a);
    where langSm is the selectionModel
    vg Steffen
    --------------------------------------
    Release Manager of TYPO3 4.5

  3. #3
    Sencha User
    Join Date
    Dec 2009
    Posts
    425

    Default

    Danke, Steffen

Similar Threads

  1. CheckBoxSelectionModel Question
    By emmas in forum Ext GWT: Discussion
    Replies: 1
    Last Post: 27 Apr 2010, 1:24 PM
  2. CheckBoxSelectionModel question
    By raj_plays in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 21 Feb 2010, 10:26 PM
  3. CheckboxSelectionModel question
    By marco76 in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 30 Jul 2008, 3:05 PM
  4. newbie question
    By RyanZec in forum Ext 2.x: Help & Discussion
    Replies: 6
    Last Post: 17 Apr 2008, 11:18 AM
  5. Question about CheckboxSelectionModel
    By allenyoung in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 15 Nov 2007, 5:08 AM

Posting Permissions

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