Hi,
I have a bound grid to an entity datasource and can edit the data correctly.
One of the columns is a key (plantID) that is initially passed in from the load as a parameter on the datasource.
This key value needs to be defaulted to that same parameter value when I am adding a record....
I can do this fine using
I have a bound grid to an entity datasource and can edit the data correctly.
One of the columns is a key (plantID) that is initially passed in from the load as a parameter on the datasource.
This key value needs to be defaulted to that same parameter value when I am adding a record....
I can do this fine using
If (e.CommandName = RadGrid.InitInsertCommandName) Then
'cancel the default operation
e.Canceled = True
'Prepare an IDictionary with the predefined values
Dim newValues As System.Collections.Specialized.ListDictionary = New System.Collections.Specialized.ListDictionary()
newValues("plantID") = Session("PlantID")
'Insert the item and rebind
e.Item.OwnerTableView.InsertItem(newValues)
End If
When I go to add a new record there is a textbox with the correct session value for plantID in there and the value inserts ok...
What I want to do though is hide this text box when the grid is in edit mode - but I can't seem to do it without forcing the column to be read only - which obviously defeats the object...
Is there a way of using the default insert value as above but not displaying the textbox in edit mode?
Thanks in advance for any help...