RadTabStrip On Click Show Prompt
When the user clicks on a tab, I want to fire the radconfirm window to ask them if they want to proceed. Now, I cancel the event, fire radconfirm, and in the callback, if successful, I'm trying to explicitly postback to show the new tab. I tried doing:
//In tabSelecting event on client
e.get_tab().select(); //to select the new tab because I canceled the selection earlier on
sender._postback(e.get_tab()); //to perform the postback
The RadMultiPage gets 开发者_StackOverflow中文版updated to the new tab's content, but the RadTabStrip does not show me the new tab selected. I see the old tab selected with the new tab's content.
Any ideas?
Thanks.
If you get your hands on the client object of the clicked tab, you can set is as selected using the set_selected method from the client API (see here).
Because I was attaching to tabSelecting, I need to add a boolean in the component to prevent the cancelling of the event the second time, because setting the selected tab was also firing tabSelecting event. That was the fix.
精彩评论