3 Answers, 1 is accepted
0
Hello Zed,
You won't be able to access the RadComboBox on Page_Load when RadGrid is created for the first time because the items are not available yet at this point. Therefore I recommend you use the ItemCreated event handler instead.
Let me know if you need more information.
Regards,
Daniel
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
You won't be able to access the RadComboBox on Page_Load when RadGrid is created for the first time because the items are not available yet at this point. Therefore I recommend you use the ItemCreated event handler instead.
Let me know if you need more information.
Regards,
Daniel
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Zed
Top achievements
Rank 1
answered on 23 Oct 2009, 10:42 AM
please show me how to find and disable the radcombobox in the radgrid_itemcreated event handler
Thanks
Thanks
0
Princy
Top achievements
Rank 2
answered on 23 Oct 2009, 10:58 AM
Hello Zed,
Here's an example to access a radcombobox in the ItemTemplate of a GridTemplateColumn in the ItemCreated event of the grid:
aspx:
c#:
Thanks
Princy.
Here's an example to access a radcombobox in the ItemTemplate of a GridTemplateColumn in the ItemCreated event of the grid:
aspx:
| <telerik:GridTemplateColumn UniqueName="TemplateColumn"> |
| <ItemTemplate> |
| <telerik:RadComboBox ID="RadComboBox1" runat="server"> |
| </telerik:RadComboBox> |
| </ItemTemplate> |
| </telerik:GridTemplateColumn> |
c#:
| protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e) |
| { |
| if (e.Item is GridDataItem) |
| { |
| GridDataItem item = (GridDataItem)e.Item; |
| RadComboBox combo = item.FindControl("RadComboBox1") as RadComboBox; |
| combo.Enabled = false; |
| } |
| } |
Thanks
Princy.