I have a CommandItemTemplate contain RadToolBar which also contain RadComboBox, what i need to do here is to dynamically set value for the RadComboBox when page is loaded and in button click event. This is the code I have in Page_Load/Button_Click event:
I kept getting "Index was outside the bounds of the array" but I have only one Item (RadToolBar) in CommandItemTemplate. I saw samples that do it in ItemCreate event, but I need my control to interact with button click, how can I do it?
Thanks in advance!
Shannon
GridItem commandItem = RadGrid1.MasterTableView.GetItems(GridItemType.CommandItem)[0];
RadToolBar radtoolbar = (RadToolBar)commandItem.FindControl("RadToolBar1");
RadToolBarItem comboitem = radtoolbar.FindItemByText("RadToolBarButton1");
RadComboBox rcb = (RadComboBox)comboitem.FindControl("RadComboBox1");
Thanks in advance!
Shannon