All Products
Demos
Pricing
Services
Blogs
Docs & Support
Search
Shopping cart
Login
Contact Us
Get A Free Trial
close mobile menu
Telerik Forums
/
UI for ASP.NET AJAX Forum
/
TabStrip
/
Prevent post-back while allowing client-side events to happen
Cancel
Telerik UI for ASP.NET AJAX
Resources
Buy
Try
Feed for this thread
3 posts, 1 answers
Alexander
20 posts
Member since:
Jun 2008
Posted 25 Jun 2008
Link to this post
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.
Answer
Paul
Admin
4281 posts
Posted 25 Jun 2008
Link to this post
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
Alexander
20 posts
Member since:
Jun 2008
Posted 25 Jun 2008
Link to this post
I can't believe I didn't see that property. Thank you for your swift and helpful answer. :-)
Back to Top
Close