none
Datagridview: FirstDisplayedScrollingRowIndex shows not the last row in the visible region RRS feed

  • Allgemeine Diskussion

  • Hi,

    I have a Datagridview and in the event DataBindingComplete I do the following

    With Datgridview1
    	.AutoResizeColumns()
    	If .RowCount > 0 Then
    		.Rows(.RowCount - 1).Selected = True
    		.FirstDisplayedScrollingRowIndex = .RowCount - 1
    	End If
    End With

    This code doesn't work, when my Datagridview has Columnheaders which are two-lined. Then I can't see the last row in the visible region, but the secondlast. I have to scroll to this last row always.

    What is to do, to see the last row directly?


    Dietrich


    • Bearbeitet dherrmann Montag, 11. März 2013 14:13
    • Typ geändert Ionut DumaModerator Mittwoch, 20. März 2013 15:35 Keine Ruckmeldung des Fragenstellender
    Montag, 11. März 2013 14:11

Alle Antworten

  • Hello dherrmann,

    Thank you for your question but this is a German speaking forum so please post in German, if you are looking for the English forums you can find them here http://social.msdn.microsoft.com/Forums/en-US/categories

    Regarding your question, I've tested your code and it seems to work, can you provide more Infos, possibly also a screenshot with the problem.

    Have a nice day,

    Ionut

    Mittwoch, 13. März 2013 10:25
    Moderator
  • ****************************************************************************************************************
    Dieser Thread wurde mangels weiterer Beteiligung des Fragestellenden ohne bestätigte Lösung abgeschlossen.
    Neue Rückfragen oder Ergänzungen zu diesem Thread bleiben weiterhin möglich.
    ****************************************************************************************************************
    Mittwoch, 20. März 2013 15:35
    Moderator