DatagridView scroll to last row

0
0

Hi,

a have a datagridview filled using :

Me.Rows.Insert(0, NewRow)

My idea was to have on top and visible last record inserted, but datagrid scrolls to the last row, so i have to scroll manually to the first record, until a new one will be inserted, and it will scroll again

i have tried to use :

Me.ScrollRowIntoView(0)

after insert with no result.

Also if  i disable scrollbars, first records disappears.

Any suggestion?

Tks

Nello Pernice

 

 

  • You must to post comments
0
0

Hi Nello,

issue #2543 is fixed in our latest Wisej release (2.2.36).

Best regards
Frank

  • You must to post comments
0
0

After inserting the row at the top the current cell is still the current cell which is always the last row since you insert above. The current cell will scroll into view, which is correct.

  • You must to post comments
0
0

Hi Nello,

Thanks for the information!

DGV.ScrollRowIntoView() not working is a bug, I’ve logged it as issue #2543. We’ll try to get a fix for the next build. In the meantime… you should be able to use ScrollCellIntoView, I tested it and it seems to be working. Please let me know if you have issues with it.

When using DGV.Rows.Add and DGV.Rows.Insert, WinForms does not scroll to the bottom of the DGV. I will see if we can change this behavior in Wisej or if we should log an enhancement for an optional parameter (i.e. shouldScrollToBottom). Either way, fixing ScrollRowIntoView should solve your issue.

I’ll keep you updated!

Best,

Levie

 

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.