Jump to content

Recommended Posts

Posted

I would like to scroll the grid when a new record is created and this record is active.

Is there a way how to do it?

 

If I locate the record and refresh the grid, the selection is on the right record but the scrollbar is on the top...

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

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

Posted

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
  • 5 years later...
Posted

Hi,

 

When locating the record does not scroll until the record in uniDBGrid.

 

I couldn't reproduce.

 

How can we reproduce this, can you make a simple testcase for this ?!

  • 4 weeks later...
  • 2 weeks later...
  • 11 months later...
Posted
On 7/10/2018 at 9:35 AM, Farshad Mohajeri said:

Hi,

is any working solution for TUnimDBGrid? I need scroll to inserted row and nothing works :(

Thanks...

 

 

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...