Results 1 to 3 of 3

Thread: Grid Group Header w/ Checkbox Refresh

  1. #1
    Sencha User
    Join Date
    Dec 2015
    Posts
    118
    Answers
    12

    Default Grid Group Header w/ Checkbox Refresh

    There is this fiddle that has a grid with grouping feature.
    It has a custom group header tpl to check/uncheck a particular group.

    The current problem is that there is a slight delay between the click event and the group header update.
    How to erase this delay?

    Your help is appreciated,

  2. #2
    Sencha User
    Join Date
    Feb 2017
    Posts
    9
    Answers
    1

    Default

    I would recommend using for-loops instead of foreach and store.each.
    We did some measurements and found that foreach and Ext.each are a lot slower than your standard for-loop.


    for(var i = 0; i < children.length; i++) {
    var c = children[i];
    excludeGroup |= c.data.excludeFromOrder;
    }


    var recs = v.getStore().getRange();
    for(var i = 0; i < recs.length; i++) {
    var r = recs[i];
    if (r.data.ownerid === Number(group)) {
    children.push(r);
    excludeGroup |= r.data.excludeFromOrder;
    }
    }
    for(var i = 0; i < children.length; i++) {
    var c = children[i];
    c.set('excludeFromOrder', !excludeGroup);
    }

  3. #3
    Sencha User
    Join Date
    Dec 2015
    Posts
    118
    Answers
    12

    Default

    The fiddle is now using for-loops, however the delay is still there.

    Using Ext.suspendLayouts/Ext.resumeLayouts around to view altering code(records update) slightly improves it.

Similar Threads

  1. how to change the group header of group summary grid?
    By DivyaSharma15 in forum Ext JS 6.x Q&A
    Replies: 1
    Last Post: 29 Sep 2017, 12:31 AM
  2. Replies: 6
    Last Post: 1 Jun 2017, 1:45 AM
  3. Replies: 2
    Last Post: 15 Sep 2013, 11:37 PM
  4. Replies: 6
    Last Post: 11 Oct 2011, 6:12 AM
  5. How to remove Group Header from Group Summary Grid Panel?
    By msuresh in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 28 Jan 2010, 1:42 AM

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
  •