Get RadPageView ID

6 posts, 0 answers
  1. Kjell
    Kjell avatar
    203 posts
    Member since:
    May 2011

    Posted 30 Nov 2011 Link to this post

    In your exemple TabStrip / Unique Tab Appearance.
    How do i get in Page_Load / codebehind (vb) that i have click on RadPageView4 (Robertina)?
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 01 Dec 2011 Link to this post

    Hello,

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Bozhidar
    Admin
    Bozhidar avatar
    1102 posts

    Posted 01 Dec 2011 Link to this post

    Hi Kjell,

    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.

    Regards,
    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
  5. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1596 posts

    Posted 01 Dec 2011 Link to this post

    Hello Kjell,


    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
  6. Kjell
    Kjell avatar
    203 posts
    Member since:
    May 2011

    Posted 01 Dec 2011 Link to this post

  7. Bozhidar
    Admin
    Bozhidar avatar
    1102 posts

    Posted 01 Dec 2011 Link to this post

    Hello Kjell,

    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];
    Regards,
    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
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017