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 add custom icon To Toolbar?

Platform: ASP.NET Web Forms |
Control: Gantt

In ASP.NET Web Gantt, we can customize the toolbar with custom icons and can bind click event to the icon using the toolbarSettings.customToolbarItems property. We can define the required custom toolbar items in this property and handle the click events using toolbarClick client side event.

There are two ways to define custom toolbar items in Gantt,

By using CSS text:

We need to define the required custom toolbar item in the customToolbarItems.text property. And by using this text value, we can bind the event for the custom icon in toolbarClick event. Find the below code example for details.

<style type="text/css" class="cssStyles">
  .Reset:before {
      content: "\e677";
        toolbarSettings: {
            showToolbar: true,
            customToolbarItems: [{
                text: "Reset",
                tooltipText: "Reset"
        toolbarClick: function (args) {
            if (args.itemName == "Reset") {
                // actions to be taken while clicking custom toolbar item

By using template:

We can also customize the toolbar items by providing the JsRender template to the templateID property. Find the below code example for details.

<script id="ColumnVisibility" type="text/x-jsrender">
        <input id="dropdownContainer" />
        toolbarSettings: {
            showToolbar: true,
            customToolbarItems: [{
                templateID: "#ColumnVisibility",
                tooltipText: "Column Visibility"],
        create: function(args) {
                height: 30,
                dataSource: dropData,
                showCheckbox: true,
                field: {
                    text: "text",
                    value: "value",
                    selected: "selected"
                checkChange: function(args) {
                    var ganttObj = $("#GanttContainer").data("ejGantt");
                    if (args.isChecked == false) {
                    } else {

You can find a sample to show custom toolbar items in Gantt below,


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