Brian Mains
Brian Mains

Reputation: 50728

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 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.

Upvotes: 0

Views: 3009

Answers (2)

Brian Mains
Brian Mains

Reputation: 50728

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.

Upvotes: 0

Dick Lampard
Dick Lampard

Reputation: 2266

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).

Upvotes: 1

Related Questions