Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    ListGrid focus row

    Hello,

    Is there a way to set or clear the keyboard focus row on a ListGrid (the one returned by getFocusRow)?

    I'd like to manually set focus to a specific record (after a separate search submit), but the grid seems to remember the previous focus row, and jump to that when i press an arrow key.

    br,

    pm

    #2
    Originally posted by pm View Post
    Hello,

    Is there a way to set or clear the keyboard focus row on a ListGrid (the one returned by getFocusRow)?

    I'd like to manually set focus to a specific record (after a separate search submit), but the grid seems to remember the previous focus row, and jump to that when i press an arrow key.

    br,

    pm
    Hi! I get same problem.
    Try this (i think some bugs in this code)

    Code:
      setCurrentLine: function (rowID) {
        // not in documentation!
        this.scrollToRow(rowID);
        // wait for data arrived
        Page.waitFor(this, "dataArrived", {
          method:function (rowNum, grid) {
            grid.selectSingleRecord(rowNum);
          },
          args:[rowID, this],
          target:this});
    
        // and if rowID already in cache and visible
        selectSingleRecord(rowID);
      }
    Last edited by Coriolis; 17 Oct 2012, 06:38.

    Comment

    Working...
    X