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

[Solved] How to get grid reference from maste page?

3 Answers 133 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Goran
Top achievements
Rank 1
Goran asked on 29 Mar 2013, 06:52 AM
Hi,

We have ASP.NET application that consists of master and content page. We load dynamically (using LoadControl method) our user control that has Telerik's grid. There can be 1 master and more detail grids. Detail grids are in separate rad tabs.

How can we get the reference to right grid from master page in case we selected particular tab where grid is placed?

The Ajax is enabled.

Thank you in advance.

Goran

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 01 Apr 2013, 07:06 AM
HI,

Try the following code.
C#:
protected void Button1_Click(object sender, EventArgs e)
{
    RadGrid RadGrid1 = (RadGrid)ContentPlaceHolder1.FindControl("RadGrid1");
}

Thanks,
Princy
0
Goran
Top achievements
Rank 1
answered on 01 Apr 2013, 09:17 AM
I don't know how I can use it because we can have for example 3 grids (1 master and 2 detail that are in rad tabs) and there's no "RadGrid1" in source markup of the page. There's something like "ctl00" and so on.

I have context menu on each grid and when click "Export" option on particular grid I need to get right grid object in master page in order to export it to MS Excel.

This is pretty urgent and it would be nice if somebody could help.
0
Goran
Top achievements
Rank 1
answered on 01 Apr 2013, 11:38 AM
Princy,

We can cancel this question because it can't be done in this way in our case.

Thank you for your support.

Regards,

Goran
Tags
Grid
Asked by
Goran
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Goran
Top achievements
Rank 1
Share this question
or