This is a migrated thread and some comments may be shown as answers.

Error on

2 Answers 64 Views
Grid
This is a migrated thread and some comments may be shown as answers.
jo
Top achievements
Rank 1
jo asked on 07 Jul 2008, 07:37 PM

I got this syntax from -Different edit/insert forms with auto-generated edit form
 private void RadGrid1_ItemCommand(object source, Telerik.WebControls.GridCommandEventArgs e)
{
GridBoundColumn birthDateColumn = e.Item.OwnerTableView.GetColumnSafe("BirthDate");
}

Iā€™m getting an error on ā€œGridBoundColumn birthDateColumn = e.Item.OwnerTableView.GetColumnSafe("BirthDate");ā€

Cannot implicitly convert type 'Telerik.Web.UI.GridColumn' to 'Telerik.Web.UI.GridBoundColumn'. An explicit conversion exists (are you missing a cast?)

Please help!!

Thanks.           

Jo.

2 Answers, 1 is accepted

Sort by
0
Accepted
Vlad
Telerik team
answered on 08 Jul 2008, 04:44 AM
Hi jo,

Thanks for pointing this. The correct code will be:

GridBoundColumn birthDateColumn = (GridBoundColumn)e.Item.OwnerTableView.GetColumnSafe("BirthDate");

Kind regards,
Vlad
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
jo
Top achievements
Rank 1
answered on 08 Jul 2008, 02:11 PM
thanks!
Tags
Grid
Asked by
jo
Top achievements
Rank 1
Answers by
Vlad
Telerik team
jo
Top achievements
Rank 1
Share this question
or