5 Answers, 1 is accepted
0
Princy
Top achievements
Rank 2
answered on 01 Dec 2011, 06:56 AM
Hello,
You can access RadPageView on PageLoad by Tab's Text or Value and then access the ID.
CS:
Otherwise you can access the clicked Tab's PageView on TabClick.
CS:
Thanks,
Princy.
You can access RadPageView on PageLoad by Tab's Text or Value and then access the ID.
CS:
protected
void
Page_Load(
object
sender, EventArgs e)
{
RadPageView pg = (RadPageView)rdtabCSD.FindTabByText(
"Page2"
).PageView;
string
pgid = pg.ID;
}
Otherwise you can access the clicked Tab's PageView on TabClick.
CS:
protected
void
rdtabCSD_TabClick(
object
sender, RadTabStripEventArgs e)
{
RadTab tb= e.Tab
as
RadTab;
string
pgid = tb.PageView.ID;
}
Thanks,
Princy.
0
Hi Kjell,
Bozhidar
the Telerik team
You can use the approach demonstrated here.
It gets the ID of the selected RadPageView and stores it in a hidden field. The you can take this value and check it in the Page_Load event on the server side.
Bozhidar
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Hello Kjell,
Kind regards,
Genady Sergeev
the Telerik team
Kind regards,
Genady Sergeev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Kjell
Top achievements
Rank 1
Iron
answered on 01 Dec 2011, 11:06 AM
0
Hello Kjell,
Regards,
Bozhidar
the Telerik team
The method I showed you a link to doesn't rely on the tab's Text property. It takes the zero-based index of the tab in the RadTabStrip. You can then use this index to find the tab like so:
int
index = Int32.Parse(hiddenField.Value);
RadTab tab = RadTabStrip1.GetAllTabs()[index];
Bozhidar
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now