|
-
Nov 11th, 2002, 04:40 AM
#1
Thread Starter
Addicted Member
Protected, Shadow, etc.
Hi all,
I found this snippet from syncfusion.com to programmatically scroll the datagrid to a particular row
VB Code:
Public Class MyDataGrid
Inherits DataGrid
Sub ScrollToRow(ByVal row As Integer)
If Not Me.DataSource Is Nothing Then
Me.GridVScrolled(Me, New ScrollEventArgs(ScrollEventType.LargeIncrement, row))
End If
End Sub
End Class
How can I incorporate this in my code. I have a form with a datagrid. If I remove public class to just retain the sub block:
VB Code:
Sub ScrollToRow(ByVal row As Integer)
If Not datagrid1.DataSource Is Nothing Then
datagrid1.GridVScrolled(Me, New ScrollEventArgs(ScrollEventType.LargeIncrement, row))
End If
End Sub
i get an error:
D:\vendormst\vendor.vb(263): 'System.Windows.Forms.DataGrid.Protected Overridable Overloads Sub GridVScrolled(sender As Object, se As System.Windows.Forms.ScrollEventArgs)' is not accessible in this context because it is 'Protected'.
Could somebody help me to understand the concept protected, override, shadow, overloading. I've read a lot of topics about these but couldn't understand these fully.
Thanks a lot.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|