Showing posts with label value. Show all posts
Showing posts with label value. Show all posts

Friday, November 13, 2009

How to find current RadTabStrip in radgrid

  1. Go through all the RadTabStrip  in grid
protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)
{
    foreach( GridNestedViewItem item in RadGrid1.MasterTableView.GetItems(GridItemType.NestedView))
    {
        RadTabStrip TabStrip = (RadTabStrip) item.FindControl("RadTabStrip1");
    }
}
2. Following code for accessing the RadTabStrip placed in NestedViewTemplate on expanding the item.

protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)
{
    if (e.CommandName == RadGrid.ExpandCollapseCommandName)
    {
        GridDataItem item = (GridDataItem)e.Item;
        GridNestedViewItem nestedItem = (GridNestedViewItem)item.ChildItem;
        RadTabStrip TabStrip = (RadTabStrip)nestedItem.FindControl("RadTabStrip1");
    }
}