[Howto] Iterate through a Tab control with bound item
I would like some insigth or help on the following issue that i am facing.
I am building an empty validation module. where i validate my bound item whether they are empty or or not before save.
I have a tab control with the said bound items. The thing is i could iterate through them and check them but it seem if the page is not visible or have been click it will not be considered and it will always return empty.
'Get the original tab page index
XtraTabPageIndex = FrmMain.XtraTabControl1.SelectedTabPageIndex
'Get the controls in the Main Form
For Each MainCtrl In FrmMain.Controls
'proceed if it is a Xtratabcontrol
If TypeOf MainCtrl Is XtraTabControl Then
'get each tab control bound to the main form
For Each MainTabCtrl In MainCtrl.Controls
'set the tab pages to visible
MainTabCtrl.Visible = True
I have the code that i use to solve the issue by looping the page index
'Reset back the tab pages index as it will change once the visibility
'code have been executed
'loop back all of the tab page index
For i = 0 To 4
FrmMain.XtraTabControl1.SelectedTabPageIndex = i
'Reset back the tab page to the original index
FrmMain.XtraTabControl1.SelectedTabPageIndex = XtraTabPageIndex
but i am writing here is because is there any other method that i could iterate the control of tab bound item without resorting the codes i have above...
Is there a way to check the bound item without looping the visibility option?
I would be grateful for any suggestions...
Related Article:tab control for web browser (vb2005)
is a VB.NET discussion thread by DyO1 that has 1 reply, was last updated 9 months ago and has been tagged with the keywords: web, browser, tab, control.