[CLOSED] grid.view.refreshRow calls grid.view.refresh(false) - HUGE PERF ISSUE

  1. #1

    [CLOSED] grid.view.refreshRow calls grid.view.refresh(false) - HUGE PERF ISSUE

        refreshRow : function (record) {
            Ext.ux.grid.LockingGridView.superclass.refreshRow.call(this, record);
            var index = Ext.isNumber(record) ? record : this.ds.indexOf(record);
            this.getLockedRow(index).rowIndex = index;
            //need to check after 3.3.0 release - http://forums.ext.net/showthread.php?9174-1.0-Locking-gridview-refreshRow-method-broken
            this.grid.view.refresh(false);
        }
    I have a grid with 200 items with a menu command column. The menu contains 10 items. When I do a refreshRow, it ends up calling entire refresh on the whole grid which destroys and recreates those 200 toolbars all over again. IE7 will complain about long running script. This wasn't the case before v1.0, and now we are getting tons of perf complaints about our app. The main section of our app is this grid. All I need is to update the cell value of a row. Can I do that without grid.view.refreshRow and without grid.view.refresh?

    Also, is there a way to delay the rendering of those toolbars or share toolbars? Because right now, 200 toolbars X 10 subitems is a huge perf issue given the new slow way of toolbar rendering in ExtJS 3.3.
    Last edited by Daniil; Mar 29, 2011 at 10:54 PM. Reason: [CLOSED]
  2. #2
    It would be great if the command event contains a reference to the toolbar itself. Once the toolbar has been created, I can't find a way to get a reference to it from the command event or row click event.

                    toolbar.items.each(function (button) {
                        if (button.on) {
                            button.toolbar = toolbar;
    
                            if (button.standOut) {
                                button.on("mouseout", function () {
                                    this.getEl().addClass("x-btn-over");
                                }, button);
                            }
    
                            if (!Ext.isEmpty(button.command, false)) {
                                button.on("click", function () {
                                    this.toolbar.grid.fireEvent("command", this.command, this.toolbar.record, this.toolbar.rowIndex);
                                }, button);
                            }
    
                            if (button.menu && !button.menu.shared) {
                                this.initMenu(button.menu, toolbar);
                            }
                        }
                    }, this);
  3. #3
    Hi,

    I guess you have to update from SVN, refreshRow method was modified at 16 Sep and now it doesn't refresh whole view

    Also, is there a way to delay the rendering of those toolbars or share toolbars? Because right now, 200 toolbars X 10 subitems is a huge perf issue given the new slow way of toolbar rendering in ExtJS 3.3
    You can share menu (but toolbars cannot be shared), set Shared="true" for Menu
  4. #4
    Quote Originally Posted by Vladimir View Post
    Hi,

    I guess you have to update from SVN, refreshRow method was modified at 16 Sep and now it doesn't refresh whole view


    You can share menu (but toolbars cannot be shared), set Shared="true" for Menu
    Thanks Vladimir. I am able to bypass refreshRow for now by adding a reference to the toolbar to each record during the prepareToolbar event. And good to know this has been fixed.

    As for the share menu, I will start a new thread because I have some questions on how to share menu but make the menu items dynamic per row (hiding/showing on menu expand)
  5. #5

    net grid

    You can reduce the number of round-trips to the database, thereby improving application performance, by grouping multiple UPDATE, DELETE, or INSERT statements into a single batch and having the whole batch sent to the database and processed in one trip. This is referred to as update batching .More detail you can visit dapfor. com
  6. #6
    Hi,

    I have userd Ext.net 2.1 version.
    I am unable to find refreshRow() method of GridPanel.
    I have tried both
    gridPanel1.refreshRow() and gridPanel1.view.refreshRow() (JavaScript ) but I got the following error
    Uncaught TypeError: Object [object Object] has no method 'refreshRow'

    As in my case it also very slow by using grid.view.refresh() method.

    Thanks
    Shailesh
  7. #7
    Hello!

    @shaileshsakaria, this thread from 1.x forum so you supposed to create new thread for your question. However, for your case, please, take a look at this method: http://docs.sencha.com/ext-js/4-1/#!...od-refreshNode
  8. #8
    Hello,

    The thread http://docs.sencha.com/ext-js/4-1/#!...od-refreshNode Helped me get my solution.

    Thanks a lot Baidaly.

    Regards
    Shailesh

Similar Threads

  1. Grid View inside a tab IFrame
    By chrono in forum 2.x Help
    Replies: 1
    Last Post: Jun 12, 2012, 10:51 AM
  2. Replies: 2
    Last Post: Jul 25, 2011, 9:24 AM
  3. [CLOSED] Grid.view.refreshRow too slow. Is there an alternative?
    By jchau in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 16, 2011, 10:40 PM
  4. NaN/NaN/0NaN in some of the Grid View columns
    By meareal in forum 1.x Help
    Replies: 3
    Last Post: Jan 31, 2011, 2:03 PM
  5. [CLOSED] locking grid view in right side?
    By Suntico in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jan 19, 2011, 11:38 AM

Tags for this Thread

Posting Permissions