tab page questions
-
I have afew questions regarding the tab page control: 1) I have to force the user to not change the page untill a database is loaded. I used the invalidating event to force the user not to change focus untill the dataset is loaded. the only problem is: i don't kow how to put the condition: dataset.tables.count!=0 is right?? and does the validating event actually worg between tab pages? 2) I want certain tab pages to be either disabled (I mean to appear on the tab control disabled, not all the controls on it to be disabled) or invisible(likevise) how do i do that?
rzvme
-
I have afew questions regarding the tab page control: 1) I have to force the user to not change the page untill a database is loaded. I used the invalidating event to force the user not to change focus untill the dataset is loaded. the only problem is: i don't kow how to put the condition: dataset.tables.count!=0 is right?? and does the validating event actually worg between tab pages? 2) I want certain tab pages to be either disabled (I mean to appear on the tab control disabled, not all the controls on it to be disabled) or invisible(likevise) how do i do that?
rzvme
rzvme wrote:
i don't kow how to put the conditio
1)If you use .Net 2.0 there is an event called DataSet.Initialized, and a property called DataSet.IsInitialized. When the Dataset finishes initialization, the event fires, and the property is set to true.
rzvme wrote:
- I want certain tab pages to be either disabled (I mean to appear on the tab control disabled, not all the controls on it to be disabled) or invisible(likevise) how do i do that?
- I don't think I caught up with you, but if I got you right, then you don't want to hide, nor disable the tabpages and the inner controls, yet you still don't want to allow changing the current page. You can handle TabControl.SelectedIndexChanged event, and check IsInitialized in it. If it wasn't true, revert the selected index to the page you desire.
Regards:rose:
-
I have afew questions regarding the tab page control: 1) I have to force the user to not change the page untill a database is loaded. I used the invalidating event to force the user not to change focus untill the dataset is loaded. the only problem is: i don't kow how to put the condition: dataset.tables.count!=0 is right?? and does the validating event actually worg between tab pages? 2) I want certain tab pages to be either disabled (I mean to appear on the tab control disabled, not all the controls on it to be disabled) or invisible(likevise) how do i do that?
rzvme
-
- you may write :dataset.tables[tablename].Rows.count!=0 2) tabpagechange event can handle this.
Sorry ...
yes, but how do i get the page(index or name) from wich the index/name was chaged? the tab control doesn't have a last selected page or last selected index property. Another problem is the fact, i think, the tabcontrol selected index changed occurs after the tabpageenter event. -- modified at 1:48 Sunday 29th October, 2006
rzvme