S
Scott Adams
This is an easy question for many of you; I just can't seem to be catching
everything.
I am trying to create a custom DataGrid class that, of course, inherits from
System.Windows.Forms.DataGrid. The only thing I am trying to do is add a
method to the class called ScrollToRow() that automatically scrolls to a
specifc row in the datagrid based on the "row" argument as displayed below:
Public Class DataGridCustom
Inherits DataGrid
Sub ScrollToRow(ByVal row As Integer)
Me.GridVScrolled(Me, New
ScrollEventArgs(ScrollEventType.LargeIncrement, row))
End Sub
End Class
I have tried declaring an object of DataGridCustom in code and setting all
of its properties (including datasource) at run-time, but the grid is not
visible for some reason and I have tried just about everything I know to
make it visible.
My questions are:
1. can I reference this custom datagrid in the designer?
2. what am I doing wrong so that it is not visible/showing up?
everything.
I am trying to create a custom DataGrid class that, of course, inherits from
System.Windows.Forms.DataGrid. The only thing I am trying to do is add a
method to the class called ScrollToRow() that automatically scrolls to a
specifc row in the datagrid based on the "row" argument as displayed below:
Public Class DataGridCustom
Inherits DataGrid
Sub ScrollToRow(ByVal row As Integer)
Me.GridVScrolled(Me, New
ScrollEventArgs(ScrollEventType.LargeIncrement, row))
End Sub
End Class
I have tried declaring an object of DataGridCustom in code and setting all
of its properties (including datasource) at run-time, but the grid is not
visible for some reason and I have tried just about everything I know to
make it visible.
My questions are:
1. can I reference this custom datagrid in the designer?
2. what am I doing wrong so that it is not visible/showing up?