Results 1 to 3 of 3

Thread: Ext.selection.Model

  1. #1
    Sencha User yeghikyan's Avatar
    Join Date
    Mar 2009
    Location
    München
    Posts
    574
    Answers
    99

    Default Answered: Ext.selection.Model

    Hallo,

    is it possible to add 'each' method to selection model in the 6-th version? i.e instead of writing:

    Code:
    var selectedRecords = grid.getSelectionModel().getSelection();
    Ext.Array.each(selectedRecords, function(record) {
        // Code
    }, this);
    write
    Code:
    grid.getSelectionModel().each(function(record) {
        // Code
    }, this);
    I can override the selection model but it would be nice to have it from box.
    "The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague." – Edsger W. Dijkstra

  2. I think you can just do:
    Code:
    grid.getSelectionModel().getSelection().forEach(function(record) {}, this);

  3. #2
    Sencha User Stormseeker's Avatar
    Join Date
    Jan 2010
    Location
    Evanston, Illinois
    Posts
    59
    Answers
    3

    Default

    I think you can just do:
    Code:
    grid.getSelectionModel().getSelection().forEach(function(record) {}, this);

  4. #3
    Sencha User yeghikyan's Avatar
    Join Date
    Mar 2009
    Location
    München
    Posts
    574
    Answers
    99

    Default

    live&learn
    "The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague." – Edsger W. Dijkstra

Similar Threads

  1. [OPEN] Ext.selection.Model loses selection on page change [4.2.3]
    By agarberi in forum Ext:Bugs
    Replies: 3
    Last Post: 26 Sep 2014, 2:14 AM
  2. Cannot bind to grid selection with cell selection model
    By nikolay.bobrovskiy in forum Ext 5: Bugs
    Replies: 5
    Last Post: 22 Sep 2014, 10:46 AM
  3. Replies: 1
    Last Post: 28 Aug 2008, 7:53 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
  •