Hi everybody,
i want to populate a ComboBox that exist on the EditFormTemplate of a detailTable base on the ParentItem DataKeyValue, when the user click on the btn add new record, so here's my code :
public void radGrid_ItemCommand(object sender, GridCommandEventArgs e)
{
if (e.CommandName == RadGrid.InitInsertCommandName)
{
if (e.Item.OwnerTableView.Name == "ChildGrid")
{
GridDataItem parentItem = (GridDataItem)(e.Item.OwnerTableView.ParentItem);
if (parentItem != null)
{
int itemId= Convert.ToInt32(parentItem.OwnerTableView.DataKeyValues[parentItem.ItemIndex]["Id"]);
//i want to get here the ComboBox control and the code (as i think) should look like this :
RadComboBox = e.item.findControl("comboId") as RadComboBox;
}
}
}
}
thanks.
i want to populate a ComboBox that exist on the EditFormTemplate of a detailTable base on the ParentItem DataKeyValue, when the user click on the btn add new record, so here's my code :
public void radGrid_ItemCommand(object sender, GridCommandEventArgs e)
{
if (e.CommandName == RadGrid.InitInsertCommandName)
{
if (e.Item.OwnerTableView.Name == "ChildGrid")
{
GridDataItem parentItem = (GridDataItem)(e.Item.OwnerTableView.ParentItem);
if (parentItem != null)
{
int itemId= Convert.ToInt32(parentItem.OwnerTableView.DataKeyValues[parentItem.ItemIndex]["Id"]);
//i want to get here the ComboBox control and the code (as i think) should look like this :
RadComboBox = e.item.findControl("comboId") as RadComboBox;
}
}
}
}
thanks.