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

Conflict between Server-side and client side button click events

1 Answer 100 Views
ToolBar
This is a migrated thread and some comments may be shown as answers.
chaitanya elluri
Top achievements
Rank 1
chaitanya elluri asked on 09 Mar 2010, 06:52 AM
Hi,

I am using the RadToolBar for some functions like View Details,Delete,Show RadGridFilter like wise...
Here for some functions i am using the server-side (like delete) and other using client side
Button1 --- ViewDetails --- for this i am using client-side function where it is redirected to other page through radwindow

Button 2 --- Toggling the RadGrid Filter option --- for this i am using client side function.

Button3 ---- delete SelectedRadGridRecords into db --- for this i am using server-side button click event of the RadToolBar..

Now the problem i am facing is,if i use both server-side and client-side clicking events..i am not able to see the RadWindow which is intiated...

Is there any solution for this..or we should not use both client-side and server-side events for the radtoolbar.

Thanks in Advance
Regards:
Chaitanya.E
chaitanya.elluru@cosmonetsolutions.com

1 Answer, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 11 Mar 2010, 02:45 PM
Hello chaitanya elluri,

As far as I understood you want to postback only when a certain buttons are clicked. To achieve this you need to subscribe to the OnClientButtonClicking event and cancel it when one of those buttons are clicked.
Example:

function OnClientButtonClicking(sender, args)
{           
   var item = args.get_item();
   if (item.get_text() == "Button2") {
     // do not postback
     args.set_cancel(true);
     //open radWindow here
   }
}

Hope this helps.

Kind regards,
Veskoni
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
ToolBar
Asked by
chaitanya elluri
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Share this question
or