Live Chat Icon For mobile
Live Chat Icon

After scrolling with the mouse wheel on a selected row in a DataGrid I cannot get it back into view. Is there a work around?

Platform: WinForms| Category: Datagrid

When you select a row in the DataGrid and scroll it out of view using the mouse wheel, you cannot get it back into view. The following is a workaround posted by one Windows Forms User:


[C#]
this.dataGrid1.MouseWheel+=new MouseEventHandler(dataGrid1_MouseWheel);

private void dataGrid1_MouseWheel(object sender, MouseEventArgs e)
{
	this.dataGrid1.Select();

}

[VB.NET]
AddHandler Me.dataGrid1.MouseWheel, addressof dataGrid1_MouseWheel
 
Private  Sub dataGrid1_MouseWheel(ByVal sender As Object, ByVal e As MouseEventArgs)
	Me.dataGrid1.Select()
 
End Sub

Share with

Share on twitter
Share on facebook
Share on linkedin

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.