Hello, I am migrating a control from GridView to RadGrid. With GridView, I was able to extend the GridViewRow class:
Public
Class
GridViewSearchRow
Inherits
GridViewRow
ReadOnly
Property
SearchValueEntry
As
ISearchValueEntry
Get
Return
FirstChildControl(Of ISearchValueEntry)()
End
Get
End
Property
Public
Sub
New
(…)
MyBase
.
New
(…)
End
Sub
End
Class
In its containing grid (an extension of GridView), I was able to instantiate my custom row by overriding GridView’s CreateRow function:
Protected
Overrides
Function
CreateRow(…)
As
GridViewRow
If
rowType = DataControlRowType.DataRow
Then
Return
New
GridViewSearchRow(…)
Else
Return
MyBase
.CreateRow(…)
End
If
End
Function
In Telerik, I am able to extend the GridDataItem class:
Public
Class
RadSearchRow
Inherits
GridDataItem
ReadOnly
Property
SearchValueEntry
As
ISearchValueEntry
Get
Return
FirstChildControl(Of ISearchValueEntry)()
End
Get
End
Property
Public
Sub
New
(…)
MyBase
.
New
(…)
End
Sub
End
Class
Is there a similar way to ensure that all objects in the .Items() collection are added as RadSearchRow? I’ve noticed that the RadGrid’s GridDataItems are created within the CreateChildControl() sub, but since CreateChildControl() isn’t a function (like GridView’s CreateRow) I’m not sure how to mimic it.
Thank you very much.