Home > Net >  The use of the winform datagridview in question
The use of the winform datagridview in question

Time:09-30

How to use the method in winform datagridview control with the scroll bar up or down

CodePudding user response:

You under reference should be very simple for a long time not write winform
Also used this scenario before demand

 
Public void ScrollToRow (int theRow)
{
//
//Expose the protected GridVScrolled method allowing you
//to programmatically scroll the grid to a particular row.
//
If (a DataSource!=null)
{
GridVScrolled (this, new ScrollEventArgs (ScrollEventType LargeIncrement, theRow));
}
}


 
Int v=dataGridView1. VerticalScrollingOffset;
Int h=dataGridView1. HorizontalScrollingOffset;
//... Reload
DataGridView1. VerticalScrollingOffset=v;
DataGridView1. HorizontalScrollingOffset=h;

CodePudding user response:

This is good, note it

CodePudding user response:

Is needed is a shift + TAB key combination operation, can write to me, please?
  •  Tags:  
  • C#
  • Related