I was trying to write some code to resize the textbox for a item in a radgrid that is using a datasource, using the ItemDataBound event. But when I click the button to edit the row the e.Item is never of type GridEditFormItem. It's always a GridDataItem even when e.ItemIsInEditMode is true.
As I mentioned, this event is properly fired when I begin to edit the row, and e.item.IsInEditMode is true for some of the items that are databound, but e.Item is always a GridDataItem.
Am I doing something wrong?
Protected
Sub
myRadGrid_ItemDataBound(
ByVal
sender
As
Object
,
ByVal
e
As
Telerik.Web.UI.GridItemEventArgs)
Handles
myRadGrid.ItemDataBound
If
((
TypeOf
(e.Item)
Is
GridEditFormItem)
And
(e.Item.IsInEditMode))
Then
'*** this will never be reached.
End
If
End
Sub
As I mentioned, this event is properly fired when I begin to edit the row, and e.item.IsInEditMode is true for some of the items that are databound, but e.Item is always a GridDataItem.
Am I doing something wrong?