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

Binding Detailsview

2 Answers 139 Views
Grid
This is a migrated thread and some comments may be shown as answers.
John John
Top achievements
Rank 1
John John asked on 03 Nov 2009, 03:19 PM
Hi
      I have nestedview grid,which has two tabs and each tab has pageview section. My scenario is i have to bind the DetailView section of one of my Tab dynamically by code. I cannot swith detaiview section to bind the data. I dont know which event helps to bind the data.


-Thanks

2 Answers, 1 is accepted

Sort by
0
Accepted
Veli
Telerik team
answered on 06 Nov 2009, 08:28 AM
Hi John,

Assuming you have declaratively placed your RadTabStrip and RadMultiPage in RadGrid's NestedViewTemplate, you can use RadGrid's ItemDataBound event to find your tab and multipage and bind them:

protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridNestedViewItem)
    {
        GridNestedViewItem item = e.Item as GridNestedViewItem;
        //use item.FindControl() to find your tab/multipage
    }
}


Regards,
Veli
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
Pieter
Top achievements
Rank 1
answered on 03 Aug 2011, 11:09 AM

Hi All

I am facing similar problem I can find tabs and DetailsView but my problem is my grid has nine tabs and each tab has pageview and DetailsView how I switch between DetailsView or tabs.

 

SO FAR I CAN FIND DetailsView LIKE THIS:

protected void gvUsers_ItemDataBound(object sender, GridItemEventArgs e)

{

if (e.Item is GridNestedViewItem)

{

GridNestedViewItem item = e.Item as GridNestedViewItem;

DetailsView dv = (DetailsView)item.FindControl("GeneralDV");

DropDownList ddlUserType = (DropDownList)dv.FindControl("ddlUserType");

}
}

Tags
Grid
Asked by
John John
Top achievements
Rank 1
Answers by
Veli
Telerik team
Pieter
Top achievements
Rank 1
Share this question
or