HI
I know this can be done but I am struggling with this. Please advise..
I have a grid in which one column is a the file name of a page in a website root.
I am using the default grid edit mode.
I have successfully got a combo box in edit mode to display a list of pages like this:
Now, when inserting I need to get the selected value to bind to the grid column to save the data. How to do this in this scenario?
Also I can display the same list when editing but then I need it to default to the current column value, while still allowing an alternative to be selected from the combo box and then to Update.
Help greatly appreciated!
Thanks
Clive
I know this can be done but I am struggling with this. Please advise..
I have a grid in which one column is a the file name of a page in a website root.
I am using the default grid edit mode.
I have successfully got a combo box in edit mode to display a list of pages like this:
Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound
If TypeOf e.Item Is GridEditableItem And e.Item.IsInEditMode Then
If e.Item.OwnerTableView.IsItemInserted Then
'item is about to be inserted
Dim item As GridEditableItem = DirectCast(e.Item, GridEditableItem)
Dim RCBx As RadComboBox = DirectCast(item.FindControl("RadComboBoxPageName"), RadComboBox)
Dim dirInfo As New DirectoryInfo(Server.MapPath("~/"))
RCBx.DataSource = dirInfo.GetFiles("*.aspx")
RCBx.DataBind()
Else
'item is about to be edited
End If
End If
End Sub
Now, when inserting I need to get the selected value to bind to the grid column to save the data. How to do this in this scenario?
Also I can display the same list when editing but then I need it to default to the current column value, while still allowing an alternative to be selected from the combo box and then to Update.
Help greatly appreciated!
Thanks
Clive