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

Validate the data and restrict user to change the Tab

3 Answers 60 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
chintan
Top achievements
Rank 1
chintan asked on 08 Oct 2009, 06:24 PM
Hi,

Lets say i have four tabs, each tab has one TextBox.
Each tab has its own validation system. in which it doesn't allow you to go to another tab if the text box's data is not valid (e.g empty)

If user switches from one tab to another, the particular tab's data should get validated and user should not allowed to jump to another Tab.

I have used Yes/No/Cancel modal window to ask user to choose action, if it is yes/no then it should move to another tab otherwise it should stay on same tab. (The modal window's result is async)

please tell me how could i cancel the tab switching using async result???

3 Answers, 1 is accepted

Sort by
0
Miroslav
Telerik team
answered on 13 Oct 2009, 10:30 AM
Hi Chintan,

Unfortunately currently there is no way to cancel a user selection. In the Q3 release of the controls the TabControl has the PreviewSelectionChnaged event that can be handled to cancel the user selection.

When you cancel the selection, you can see what selection was intended and store it somewhere. Then you may decide to navigate again to this tab after the user closes the dialog.

Unfortunately currently you have to handle the SelectionChanged event and switch back to the previous selection, which may not always be desired.

Greetings,
Miroslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
chintan
Top achievements
Rank 1
answered on 13 Oct 2009, 03:31 PM
That's okay Miroslav, and thanks

we will wait for Q3 release.

Could you please tell us the appx release date?
0
Vlad
Telerik team
answered on 13 Oct 2009, 03:38 PM
Hello chintan,

Our Q3 release will be first week of November.

Greetings,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
TabControl
Asked by
chintan
Top achievements
Rank 1
Answers by
Miroslav
Telerik team
chintan
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or