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

3 posts, 0 answers
  1. Moji
    Moji avatar
    6 posts
    Member since:
    Mar 2015

    Posted 08 Mar 2015 Link to this post

    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. Stefan
    Stefan avatar
    2891 posts

    Posted 10 Mar 2015 Link to this post

    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.


    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.

  3. DevCraft R3 2016 release webinar banner
  4. Moji
    Moji avatar
    6 posts
    Member since:
    Mar 2015

    Posted 10 Mar 2015 in reply to Stefan Link to this post

    Hi Stefan,

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

Back to Top