Dear Friends
i am using rad combo box while editing my grid . edit and add is working fine only thing what i need is to set the combo box field to the grid column value on edit. but in my case it always showing the first index value in the combo box.
i am trying to get the grid column value on item command
When i am trying to assign _AreaDesc.Text to ddl1.text i am getting this error System.NullReferenceException: Object reference not set to an instance of an object.
i am using rad combo box while editing my grid . edit and add is working fine only thing what i need is to set the combo box field to the grid column value on edit. but in my case it always showing the first index value in the combo box.
i am trying to get the grid column value on item command
Private
Sub
HotelGrid_ItemCommand(
ByVal
source
As
Object
,
ByVal
e
As
Telerik.Web.UI.GridCommandEventArgs)
Handles
HotelGrid.ItemCommand
Dim
_item
As
GridEditableItem
Dim
_AreaDesc
As
TableCell
Dim
_Star
As
Int32 = 1
Dim
ddl1
As
RadComboBox
'
If
e.CommandName = RadGrid.EditCommandName
Then
Try
_item = e.Item
_AreaDesc = _item(
"AreaDesc"
)
ddl1 = DirectCast(_item.FindControl("ddHotelArea"), RadComboBox)
ddl1.Text =
_AreaDesc.Text.ToString
Catch
ex
As
Exception
DisplayMessage(ex.ToString)
End
Try
End
If
End
Sub
When i am trying to assign _AreaDesc.Text to ddl1.text i am getting this error System.NullReferenceException: Object reference not set to an instance of an object.