Jump to content

DBGrid & ScrollIntoView


petr.nehez

Recommended Posts

  • 3 weeks later...
  • 5 months later...

Anyone found a solution to force the grid to show the selected record?

 

Using version 0.91.0.984.

 

I tried:

 

MyFrame.myGrid.getView().focusRow(number);

MyFrame.myGrid.getView().getSelectionModel().select(number);

MyFrame.myGrid.getView().highlightItem(number);

scrollToView() too.

 

Nothing works.

 

Thx!

 

Bruno

Link to comment
Share on other sites

Maybe it will help:

 

if unidbgrid.WebOptions.Paged then
UniSession.AddJS('setTimeout(function () {'+
        'MainForm.unidbgrid.getView().focusRow('+IntToStr((unidbgrid.datasource.dataset.RecNo mod unidbgrid.WebOptions.PageSize)-1)+');'+
    '}, 100);'
)
else
UniSession.AddJS('setTimeout(function () {'+
        'MainForm.unidbgrid.getView().focusRow('+IntToStr(unidbgrid.datasource.dataset.RecNo-1)+');'+
    '}, 100);'
);

 

It works for me))

  • Upvote 1
Link to comment
Share on other sites

  • 5 years later...
  • 4 weeks later...
  • 2 weeks later...
  • 11 months later...
  • 2 weeks later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...