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

Prevent post-back while allowing client-side events to happen

2 Answers 113 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Alexander
Top achievements
Rank 1
Alexander asked on 25 Jun 2008, 08:24 AM
We're trying to use a RadTabStrip for navigation, where root tabs are categories, and their sub-tabs are locations. To handle the navigation, I've set up a OnTabClick server-side event, which works fine, except that it doesn't discriminate between the category (root) tabs and the location (sub) tabs, so I got a post-back for both, which was undesirable. To try and compensate for this, I set up a client-side event handler, OnClientTabSelecting, where I call "eventArgs.set_cancel(true);" if the selected tab is a root tab. This prevents the post-back, but it also stops them from being selected altogether, so now I'm stuck on the first category tab, because clicking any of the others results in nothing happening.

Do you have any suggestions for how to solve my problem? That is, client-side tab selection for root tabs, and server-side tab click event for sub tabs.

2 Answers, 1 is accepted

Sort by
0
Accepted
Paul
Telerik team
answered on 25 Jun 2008, 08:39 AM
Hello Alexander,

You can easily achieve your goal by setting the PostBack property of the root tabs to false. In that way only the child items will postback.

Sincerely yours,
Paul
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Alexander
Top achievements
Rank 1
answered on 25 Jun 2008, 08:53 AM
I can't believe I didn't see that property. Thank you for your swift and helpful answer. :-)
Tags
TabStrip
Asked by
Alexander
Top achievements
Rank 1
Answers by
Paul
Telerik team
Alexander
Top achievements
Rank 1
Share this question
or