Hi,
We want to use the user control edit feature of the RadGrid. We have a user control with a method LoadForm(ID) which takes the ID of a Product and loads it using custom business objects. Something like:
Public Sub LoadForm(ByVal ID As Integer)
Dim BO As Product = Product.Load(ID)
With BO
tbName.Text = .Name
tbPrice.Text = .Price
...
End With
End Sub
Now I am trying to use this user control in the grid. In all the examples I have seen so far DataSets or DataTables are used. Is there any example of using this edit feature with custom business objects.
The problem is that when I do something like (see below), then MyUserControl is a generic control and I can't call methods in it.
We want to use the user control edit feature of the RadGrid. We have a user control with a method LoadForm(ID) which takes the ID of a Product and loads it using custom business objects. Something like:
Public Sub LoadForm(ByVal ID As Integer)
Dim BO As Product = Product.Load(ID)
With BO
tbName.Text = .Name
tbPrice.Text = .Price
...
End With
End Sub
Now I am trying to use this user control in the grid. In all the examples I have seen so far DataSets or DataTables are used. Is there any example of using this edit feature with custom business objects.
The problem is that when I do something like (see below), then MyUserControl is a generic control and I can't call methods in it.
Dim
editedItem As GridEditableItem = CType(e.Item, GridEditableItem)
Dim MyUserControl As UserControl = CType(e.Item.FindControl(GridEditFormItem.EditFormUserControlID), UserControl)
Tahir