[CLOSED] Problem with focusRow() on Store.reload() with Firefox

Page 2 of 3 FirstFirst 123 LastLast
  1. #11
    Something similar to this?
    http://forums.ext.net/showthread.php...h-Not-Working.

    Even with this, is still not working in FF 3.6.12. Everthing we try, after the Row was focused, there is a short refresh and jump to the top.

    <Plugins>
    <ext:GridPanelMaintainScrollPositionOnRefresh runat="server" />
    </Plugins>
  2. #12
    Hi,

    Try to increase RestoreDelay value for the plugin

    We need to rebind on the server because we have 10.000 records and more and we do the paging in a stored procedure and also use OR Mapper.
    Do you return 10000 records to the client?
  3. #13
    Hi,

    I tried this:
    <ext:GridPanelMaintainScrollPositionOnRefresh runat="server" RestoreDelay="1000" />
    No change, except it waits now longer in FF until it jumps back to top. When I set
    with Firebug a Breakpoint on
    grid.getView().focusRow(index);
    with or without the GridPanelMaintainScrollPositionOnRefresh Plugin and just step
    along with F10, it doesnt jumps back to the top. Seems there is some delay or timing problem
    with FF and the refresh.

    We return, bind max. always between 100 - 150 records out of 10.000, we do filtering and goruping with
    stored procedure. so if we add only one record we need to do the binding of the 100 again because all pages have changed.
    If we would use the AddRecord the results would be wrong of the pages.
  4. #14
    I also think the MaintainScrollPosition is wrong. Because if we add for example on record at index 1 and one at index 99 it always stays where I scrolled last to. The focusRow() it the one. Because we always need to jump to the last added row within the 100, no matter of maintaining the scroll position before.
  5. #15
    Hi,

    Can you provide test solution test sample which reproduces your real page (without DB operations)? Just I guess you use PagingToolbar but you did not define it in previous sample. Also in previous you use AutoHeight therefore grid cannot be scrolled in this case. What you need to scroll: page or grid?
  6. #16
    Hi,

    okay i try to provide tomorrow a solution with the problem without DB. Yes we use Paging Toolbar, the focusRow() for scrolling within the Grid does the Job in Chrome and IE. Only FF jumps back to 1 row. We only need to focus a row on the Grid, which is always one page.
    No need of jumping to other pages. This is done already with on databind.
  7. #17
    Hi,

    If you call focusRow with delay then does it help?
    grid.getView().focusRow.defer(100, grid.getView(), [rowIndex]);
  8. #18
    Quote Originally Posted by Vladimir View Post
    Hi,

    If you call focusRow with delay then does it help?
    grid.getView().focusRow.defer(100, grid.getView(), [rowIndex]);
    Unfortunately not. Same as the plugin, it justs holds with this a while longer until it jumps/scrolls back to top.
  9. #19
    Good morning,

    okay here is the requested nice and clean vs2010 solution with the particular problem.
    When you run it in IE or Chrome, the focusRow() works fine. Firefox always scrolls back to top.

    Tests.zip

    Ext.Net 1.0 from SVN was used. (2 weeks old) :o

    Update: It's also working with Safari and Opera. So its only Firefox
  10. #20
    Hi,

    Try the following code
    <script type="text/javascript">
                var submitMaterial = function ()
                {
                    // ADD NEW RECORD
                    Test.AfterEdit("ThisIsNew",{
                        success: function(id)
                        {   
                            // ADD SUCCESS
                            if(id.ErrorCode == 0)
                            {
                                // KEY ID IN HIDDEN
                                #{hiddenPK}.setValue(id.PrimaryKey);                                        
                                
                                // RELOAD THE STORE
                                var grid = #{GridPanel1};                                        
                                
                                grid.getStore().on("load", function() {    
                                        if(#{hiddenPK}.getValue() != '')
                                        {            
                                            var index = grid.getStore().indexOfId(#{hiddenPK}.getValue());                                
                                            grid.getSelectionModel().selectRow(index);                                                   
                                            
                                            
                                            if (Ext.isGecko && grid.getView().scrollToTopTask) {                                        
                                                grid.getView().scrollToTopTask.cancel();
                                            }
                                             
                                            grid.getView().focusRow(index); 
                                        }  
                                    }, this, {single:true});
                                
                                grid.getStore().reload();
                            }                                     
                        }                    
                    });
                }
            </script>
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. [CLOSED] Store Load-handler cant reload child store
    By Jurke in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 04, 2011, 7:56 AM
  2. [CLOSED] FocusRow() for grouped GridPanel within DirectMethod
    By csharpdev in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Nov 10, 2010, 2:21 PM
  3. [CLOSED] Store.remove(record) and Store.reload()
    By capecod in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Nov 08, 2010, 10:03 AM
  4. Store.reload() problem
    By Dgsoft.ru in forum 1.x Help
    Replies: 1
    Last Post: May 28, 2009, 2:14 PM
  5. Databind / Reload Store and GridPanel Problem
    By locoperoguapo in forum 1.x Help
    Replies: 5
    Last Post: Feb 10, 2009, 9:23 AM

Posting Permissions