Good day,
I'm using the ASP.NET ajax grid version 2008.1.619.35. I'm trying to get a reference to a GridDropDownColumn with in my grid during edit mode.
I receive the following complier error message
"Error 14 Cannot convert type 'System.web.UI.Control' to 'Telerik.web.UI.GridDropDownColumn'
Here is my code
Thanks
I'm using the ASP.NET ajax grid version 2008.1.619.35. I'm trying to get a reference to a GridDropDownColumn with in my grid during edit mode.
I receive the following complier error message
"Error 14 Cannot convert type 'System.web.UI.Control' to 'Telerik.web.UI.GridDropDownColumn'
Here is my code
protected void RadGrid1_EditCommand(object source, GridCommandEventArgs e) |
{ |
//Is it a GridDataItem |
if (e.Item is GridDataItem) |
{ |
//Get the instance of the right type |
GridDataItem dataBoundItem = e.Item as GridDataItem; |
if (dataBoundItem.OwnerTableView.Name == "OrderHeader") |
{ |
GridDropDownColumn ddlStatus =(GridDropDownColumn) dataBoundItem.FindControl("Status"); |
if (Convert.ToInt16(dataBoundItem["OrderStatusID"].Text) == 1) |
{ |
if (e.Item.Edit) |
{ |
Debug.Write("Edit Mode!); |
} |
} |
else |
{ |
ddlStatus.ReadOnly = true; |
} |
} |
} |
} |
} |
Thanks