Skip to content

DatagridView scroll to last row #3015

Closed

Description

@itg-assistant

Nello Pernice asked 2021-01-28 14:46:32 UTC

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

Activity

  1. itg-assistant commented on Jun 14, 2026

    @itg-assistant
    Author

    Levie (ITG) answered 2021-01-28 16:46:09 UTC

    Hi Nello,

    Thanks for the information!

    DGV.ScrollRowIntoView() not working is a bug, I've logged it as issue iceteagroup/Wisej/issues/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

  2. itg-assistant commented on Jun 14, 2026

    @itg-assistant
    Author

    Luca answered 2021-01-28 16:48:25 UTC

    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.

  3. itg-assistant commented on Jun 14, 2026

    @itg-assistant
    Author

    Frank (ITG) answered 2021-02-10 22:11:01 UTC

    Hi Nello,

    issue iceteagroup/Wisej/issues/2543 is fixed in our latest Wisej release (2.2.36).

    Best regards
    Frank

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    SuggestionAn improvement to something that already works.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions