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

Unable to add page programatically

3 Answers 96 Views
PageView
This is a migrated thread and some comments may be shown as answers.
Saikiran
Top achievements
Rank 1
Saikiran asked on 24 May 2011, 05:03 PM
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.

3 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 25 May 2011, 04:51 PM
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.
0
Daniel
Top achievements
Rank 1
answered on 21 Feb 2014, 08:17 AM
I have also encounter this.
Even after running the radPageView1.SelectedPage = page1;
the page is still not visible
0
Stefan
Telerik team
answered on 21 Feb 2014, 11:10 AM
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
Tags
PageView
Asked by
Saikiran
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Daniel
Top achievements
Rank 1
Share this question
or