Unable to add page programatically

4 posts, 0 answers
  1. Saikiran
    Saikiran avatar
    7 posts
    Member since:
    May 2011

    Posted 24 May 2011 Link to this post

    I am trying to add a page programatically and I am unable to see newly added page.

    However, I have noticed the PageIndex is increasing.

    The following is the code:

    Telerik.WinControls.UI.RadPageViewPage page1= new Telerik.WinControls.UI.RadPageViewPage();

    page1.Text = "Search";

    RadPageView1.Pages.Add(page1);


    What I found is Page1 visible property is set to false.

    Can anyone help me on this.

    Thanks
    Charan.
  2. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 25 May 2011 Link to this post

    Hi Saikiran,

    Thank you for writing.

    I have tested the described behavior and the page is added correctly to RadPageView. However, I assume that you want to have the page content visible after adding it. If this is the case, all you have to do is to set the SelectedPage property of RadPageView to the desired page:
    Telerik.WinControls.UI.RadPageViewPage page1 = new Telerik.WinControls.UI.RadPageViewPage();
    page1.Text = "Search";
    radPageView1.Pages.Add(page1);
    radPageView1.SelectedPage = page1;

    Let me know if you need further assistance.
     
    Kind regards,
    Stefan
    the Telerik team
    Q1’11 SP1 of RadControls for WinForms is available for download; also available is the Q2'11 Roadmap for Telerik Windows Forms controls.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Daniel
    Daniel avatar
    7 posts
    Member since:
    Jul 2013

    Posted 21 Feb 2014 Link to this post

    I have also encounter this.
    Even after running the radPageView1.SelectedPage = page1;
    the page is still not visible
  5. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 21 Feb 2014 Link to this post

    Hello Daniel,

    Thank you for writing. 

    Such a behavior cannot be reproduce on my end. Can you please provide me with a small sample demonstrating the undesired behavior?

    I am looking forward to your reply. 

    Regards,
    Stefan
    Telerik
Back to Top