We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to handle server-side ToolBarClick event?

Platform: ASP.NET Web Forms |
Control: Grid

Grid’s ToolBarClick event can be handled in Code Behind using server-sideOnServerToolBarClick” event property. The event handler receives an argument of type Syncfusion.JavaScript.Web.GridEventArgs containing data related to this event. The following Syncfusion.JavaScript.Web.GridEventArgs members provide information specific to this event.

Table 1: Syncfusion.JavaScript.Web.GridEventArgs members




It indicates current toolbar item’s name.


It indicates current toolbar id.


It returns the current index of toolbar item.


It returns the current item.


It returns the grid model.


It returns the target item.


It returns the toolbar data.

Retrieve the Toolbar item value from server-side in ejGrid control:

The “OnServerToolBarClick” server-side event triggers the post back, once the toolbar item is clicked and maps to the corresponding event handler in Code Behind. In the server-side event handler, you can access the toolbar item values using the GridEventArgs e variable. Refer the following code examples.



Note: To trigger server-side events for EJ controls, you can add reference to ej.webform.min.js script file in site.master and add ScriptManager Control to the project.


<link href="Content/ej/ej.widgets.core.min.css" rel="stylesheet" />

<link href="Content/ej/flat-lime/ej.theme.min.css" rel="stylesheet" />

<script src="Scripts/jquery-1.10.2.min.js"></script>

<script src="Scripts/jsviews.min.js"></script>

<script src="Scripts/jsrender.min.js"></script>

<script src="Scripts/jquery.easing-1.3.min.js"></script>

<script src="Scripts/jquery.globalize.min.js"></script>

<script src="Scripts/ej.web.all.min.js"></script>

<script src="Scripts/ej.webform.min.js"></script>


<form id="Form2" runat="server">

<asp:ScriptManager runat="server">


. . .




2X faster development

The ultimate ASP.NET Web Forms UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile