Keep focus on column after sort/set filter

  1. #1

    Keep focus on column after sort/set filter

    Hi

    In a quite wide (175 columns) gridpanel based upon pivoted data I need to keep focus on a column after sort is applied and also after set filter

    [EDIT]: I assume I need to use focusCell(1, col#) ?

    Thanks in advance /Peter
    Last edited by plykkegaard; Dec 15, 2010 at 7:19 AM.
  2. #2
    I have added soemthing like this (codebehind)

    gridPanel.Listeners.SortChange.Delay = 200;
    // gridPanel.Listeners.SortChange.Single = true;
    gridPanel.Listeners.SortChange.Fn = 
        "function (grid, sortInfo) { " +
            "var _colModel = grid.getColumnModel(); " +
            "var _col = _colModel.findColumnIndex(sortInfo.field); " +
            "var _view = grid.getView(); " + 
            "_view.focusCell(1, _col, false); " + 
            "}";
    Single causes the darn thing to fire only once

    I have two issues
    1) Flickering as the grid scrolls to the first column and back
    2) FocusCell will set the column to the right of page (kind of obvious)

    Onload (ExtJS/grid event) causes the grid to reposition due to a call to scrolltotop() in the method
    Any way I can work around this?

    rgds /Peter

Similar Threads

  1. Replies: 2
    Last Post: May 01, 2012, 4:57 PM
  2. Replies: 4
    Last Post: Jul 25, 2011, 4:57 PM
  3. Replies: 0
    Last Post: Mar 01, 2011, 12:09 PM
  4. [CLOSED] Grid Filter loses focus
    By mjessup in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Dec 20, 2010, 11:53 AM
  5. [CLOSED] Missing filter column using MultiHeader Filter.
    By flormariafr in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Aug 12, 2010, 1:07 PM

Tags for this Thread

Posting Permissions