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

Closing a radtabstrip with an image button and confirmation message

1 Answer 66 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
hedi
Top achievements
Rank 1
hedi asked on 18 Nov 2011, 06:36 PM
Hi,
i want to close my radtabstrip using a closing image button and a radconfirm message,
the problem is that the tab is closed automatically after showing the message without waiting the user confirmation
can you help me please, i will need a function that stops the execution until the user's confirmation.


thanks!

1 Answer, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 23 Nov 2011, 11:26 AM
Hello Hedi,

You can try using the approach below and cancel the postback in case the tab is not deleted:
function OnClientClicking(sender, args) {
            if (confirm("Are you sure you want to delete the tab") == true) {
                deletingTabFunction()              
            }
            else {
            //cancel postBack
                args.set_cancel(true);
            }
        }

Best wishes,
Kate
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
TabStrip
Asked by
hedi
Top achievements
Rank 1
Answers by
Kate
Telerik team
Share this question
or