Hi,
I am using PageView Control of view mode strip like Tab i want to hide some tabs which is PageviewPage in PageView ,
on check box click event,and also want to hide some tabs first time when page is load.Is there any way to do this.
I am using PageView Control of view mode strip like Tab i want to hide some tabs which is PageviewPage in PageView ,
on check box click event,and also want to hide some tabs first time when page is load.Is there any way to do this.
4 Answers, 1 is accepted
0
Accepted

Richard Slade
Top achievements
Rank 2
answered on 20 Jan 2011, 10:56 AM
Hello,
Yes, you can do this via
Here is a full example that you can copy into a new project
Designer File (VB)
Form1.vb
let me know if you have further questions
Richard
Yes, you can do this via
Me
.PageViewPage1.Item.Visibility = ElementVisibility.Collapsed
Here is a full example that you can copy into a new project
Designer File (VB)
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial
Class
Form1
Inherits
System.Windows.Forms.Form
'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected
Overrides
Sub
Dispose(
ByVal
disposing
As
Boolean
)
Try
If
disposing
AndAlso
components IsNot
Nothing
Then
components.Dispose()
End
If
Finally
MyBase
.Dispose(disposing)
End
Try
End
Sub
'Required by the Windows Form Designer
Private
components
As
System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private
Sub
InitializeComponent()
Me
.RadPageView1 =
New
Telerik.WinControls.UI.RadPageView()
Me
.CheckBox1 =
New
System.Windows.Forms.CheckBox()
CType
(
Me
.RadPageView1, System.ComponentModel.ISupportInitialize).BeginInit()
Me
.SuspendLayout()
'
'RadPageView1
'
Me
.RadPageView1.Location =
New
System.Drawing.Point(0, 0)
Me
.RadPageView1.Name =
"RadPageView1"
Me
.RadPageView1.Size =
New
System.Drawing.Size(574, 436)
Me
.RadPageView1.TabIndex = 0
Me
.RadPageView1.Text =
"RadPageView1"
'
'CheckBox1
'
Me
.CheckBox1.AutoSize =
True
Me
.CheckBox1.Location =
New
System.Drawing.Point(418, 452)
Me
.CheckBox1.Name =
"CheckBox1"
Me
.CheckBox1.Size =
New
System.Drawing.Size(123, 17)
Me
.CheckBox1.TabIndex = 1
Me
.CheckBox1.Text =
"Show / Hide Page 1"
Me
.CheckBox1.UseVisualStyleBackColor =
True
'
'Form1
'
Me
.AutoScaleDimensions =
New
System.Drawing.SizeF(6.0!, 13.0!)
Me
.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me
.ClientSize =
New
System.Drawing.Size(574, 494)
Me
.Controls.Add(
Me
.CheckBox1)
Me
.Controls.Add(
Me
.RadPageView1)
Me
.Name =
"Form1"
Me
.Text =
"Form1"
CType
(
Me
.RadPageView1, System.ComponentModel.ISupportInitialize).EndInit()
Me
.ResumeLayout(
False
)
Me
.PerformLayout()
End
Sub
Friend
WithEvents
RadPageView1
As
Telerik.WinControls.UI.RadPageView
Friend
WithEvents
CheckBox1
As
System.Windows.Forms.CheckBox
End
Class
Form1.vb
Imports
Telerik.WinControls
Imports
Telerik.WinControls.Localization
Imports
Telerik.WinControls.UI
Imports
Telerik.WinControls.UI.Localization
Public
Class
Form1
Private
m_Page1
As
New
RadPageViewPage()
Private
m_Page2
As
New
RadPageViewPage()
Private
m_Page3
As
New
RadPageViewPage()
Private
Sub
Form1_Load(
ByVal
sender
As
System.
Object
,
ByVal
e
As
System.EventArgs)
Handles
MyBase
.Load
'// Add the pages to the Page View
Me
.RadPageView1.ViewMode = PageViewMode.Strip
m_Page1.Text =
"Page 1"
Me
.RadPageView1.Pages.Add(m_Page1)
m_Page2.Text =
"Page 2"
Me
.RadPageView1.Pages.Add(m_Page2)
m_Page3.Text =
"Page 3"
Me
.RadPageView1.Pages.Add(m_Page3)
'// Select a Page
Me
.RadPageView1.SelectedPage = m_Page3
'// Set Page 3 to invisible
Me
.m_Page1.Item.Visibility = ElementVisibility.Collapsed
End
Sub
Private
Sub
CheckBox1_CheckedChanged(
ByVal
sender
As
System.
Object
,
ByVal
e
As
System.EventArgs)
Handles
CheckBox1.CheckedChanged
If
Me
.CheckBox1.Checked
Then
Me
.m_Page1.Item.Visibility = ElementVisibility.Visible
Else
Me
.m_Page1.Item.Visibility = ElementVisibility.Collapsed
End
If
End
Sub
End
Class
let me know if you have further questions
Richard
0

Richard Slade
Top achievements
Rank 2
answered on 23 Jan 2011, 05:42 PM
Hello,
did this help? If so please remember to mark as answer. If you need further help please let me know
Richard
did this help? If so please remember to mark as answer. If you need further help please let me know
Richard
0

meraj
Top achievements
Rank 1
answered on 25 Jan 2011, 11:59 AM
Thanx for this help its very helpful
0

Richard Slade
Top achievements
Rank 2
answered on 25 Jan 2011, 12:01 PM
You're welcome. I'm glad that helped
Richard
Richard