Loading ...
Sorry, an error occurred while loading the content.

Datatable scroll to selected?

Expand Messages
  • Steve
    I have a sortable, scrollable, non-paginated datatable. As I add rows to the table, I automatically select the row using the selectRow() method. When the
    Message 1 of 2 , Oct 2, 2007
    • 0 Attachment
      I have a sortable, scrollable, non-paginated datatable. As I add rows
      to the table, I automatically select the row using the selectRow()
      method. When the datatable scrolls, however, the selected row the
      scroll does not adjust to the make sure the row is visible. Does anyone
      know a way to change the position of the scroll to ensure the selected
      row is visible?

      Thanks!
    • Debby
      After adding the row, you could try setting the _elTbody.scrollTop. I have a method: OWTable.prototype.scrollTo = function(pScrollTo) {
      Message 2 of 2 , Oct 2, 2007
      • 0 Attachment
        After adding the row, you could try setting the _elTbody.scrollTop. I
        have a method:

        OWTable.prototype.scrollTo = function(pScrollTo)
        {
        this.table._elTbody.scrollTop = pScrollTo;
        }

        where pScrollTo is the row number times the height of the row.

        Debby

        --- In ydn-javascript@yahoogroups.com, "Steve" <kelsey69@...> wrote:
        >
        > I have a sortable, scrollable, non-paginated datatable. As I add rows
        > to the table, I automatically select the row using the selectRow()
        > method. When the datatable scrolls, however, the selected row the
        > scroll does not adjust to the make sure the row is visible. Does anyone
        > know a way to change the position of the scroll to ensure the selected
        > row is visible?
        >
        > Thanks!
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.