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

How to check a TabPage existence before adding controls to it?

2 Answers 176 Views
PageView
This is a migrated thread and some comments may be shown as answers.
Moji
Top achievements
Rank 1
Moji asked on 08 Mar 2015, 11:42 AM
I am trying to implement a Sub which has two argument as following. I need to check the existence of the index tab before adding some dynamic controls to it. I had a couple of blind attempts but then I totally lost!

Private Sub insertControlsIntoTabs(tabContainer As RadPageView , tabIndexNum As Integer)
' check the existence of tabIndexNum 
'...
' Selecting tabIndexNum 
Me.tabContainer .SelectedPage = Me.tabContainer .Pages.(tabIndexNum)
End Sub

Can someone help please?

2 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 10 Mar 2015, 01:27 PM
Hello Moji,

Thank you for writing.

Each RadPageViewPage has a Name property which you can use to identify it. Using it, you can have the following check for existence of a page:
If radPageView1.Pages.Contains("yourPageName") Then
'''do something
End If

I hope that you find this information useful. Should you have any other questions, do not hesitate to contact us.

Regards,
Stefan
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Moji
Top achievements
Rank 1
answered on 10 Mar 2015, 01:57 PM
Hi Stefan,

Thanks for the reply. Although I resolved the issue earlier.

Cheers
Tags
PageView
Asked by
Moji
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Moji
Top achievements
Rank 1
Share this question
or