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

call client function oncommand column before confirmation

1 Answer 102 Views
Grid
This is a migrated thread and some comments may be shown as answers.
gila
Top achievements
Rank 1
gila asked on 15 May 2011, 08:45 AM
Hello,
I have a radgrid with GridButtonColumn for deleteing row. On clicking the command image, appears radconfirm asking the user if he is sure of the deleting.
I am searching for event(js) BEFORE the confirmation appears on client, because the text of the confirmation depends on the type of the row - some types need text1 and some needs text2.
Witch event can i call?
I tried <clientEvents> of the grid such as: OnCommand, OnRowDeleted but it didnt help - first was shown the confirm and then get in the js function.

thanks,
gila

1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 19 May 2011, 11:52 AM
Hi Gila,

I would advise you to not use the built-in confirm functionality of the button column but to rather wire the server-side ItemCreated event of the grid, attach onclick handlers to the buttons and execute your custom javascript showing the confirm dialog at the end.

Alternatively, you could try again removing the built-in confirm, wiring the client OnCommand event and executing your custom code. However, this event is exposed specifically for client-side binding, so it is possible that using it has side-effects to the grid's client-side behavior before the postback for deletion.

Best wishes,
Tsvetina
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Grid
Asked by
gila
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or