File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -99,6 +99,25 @@ public class SampleData
99
99
public DateTime HireDate { get ; set ; }
100
100
}
101
101
````
102
+ ```` VB
103
+ Protected Sub RadGrid1_NeedDataSource( ByVal sender As Object , ByVal e As GridNeedDataSourceEventArgs)
104
+ TryCast (sender, RadGrid).DataSource = MyData
105
+ End Sub
106
+
107
+ Public MyData As IEnumerable( Of SampleData) = Enumerable.Range( 1 , 30 ).[Select]( Function (x) New SampleData With {
108
+ .Id = x,
109
+ .Name = "Name " & x,
110
+ .Team = "Team " & x Mod 5 ,
111
+ .HireDate = DateTime.Now.AddDays(-x * 3 ).Date
112
+ })
113
+
114
+ Public Class SampleData
115
+ Public Property Id As Integer
116
+ Public Property Name As String
117
+ Public Property Team As String
118
+ Public Property HireDate As DateTime
119
+ End Class
120
+ ````
102
121
103
122
The result from the code snippet above
104
123
![ Basic RadGrid Example] ( images/grid-overview-basic-create.png )
You can’t perform that action at this time.
0 commit comments