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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

how to control the event click on label (<th></th>)

Thread ID:





132095 Aug 14,2017 07:10 AM UTC Aug 17,2017 04:12 PM UTC JavaScript 3
Tags: ejGrid
Luis Carlos
Asked On August 14, 2017 07:10 AM UTC


I'm using the component ejGrid, however I disable the button "add" with jquery after render, as you can see in the next image.

However,  when I clic on label "C.P.", the button "add" enables (see the image below). 

How can I keep it disabled??

I will be awating for your reply, thanks in advance.

Regards, Luis Carlos.

Thavasianand Sankaranarayanan [Syncfusion]
Replied On August 15, 2017 04:11 AM UTC

Hi Luis, 

Thanks for contacting Syncfusion support. 

We have analyzed your query and we suspect that you want to disable the add icon in the Grid header toolbar. So, we suggest you to set false as “allowAdding” property of ejGrid control. 

Refer the below code example. 

$(function () { 
                // the datasource "window.gridData" is referred from jsondata.min.js 
                dataSource: window.gridData, 
                allowPaging: true, 
                editSettings: { allowEditing: true, allowAdding: false, allowDeleting: true }, 
                toolbarSettings: { showToolbar: true, toolbarItems: [ej.Grid.ToolBarItems.Add,ej.Grid.ToolBarItems.Edit, ej.Grid.ToolBarItems.Delete, ej.Grid.ToolBarItems.Update, ej.Grid.ToolBarItems.Cancel] }, 
                columns: [ 

Refer the below screen shot. 


We have prepared a JsPlayground sample in the following link. 

Refer the help documentation. 

If we misunderstood your query then please get back to us. 

Thavasianand S.

Luis Carlos
Replied On August 16, 2017 09:33 AM UTC

Hi again.

I did it and it works well, however the icon doesn't show disabled. It shows enabled and without any action. I would like to display the disabled icon as per your example. How can I do it?

Image as is.

Image to be.

Thanks again.

Regards, Luis Carlos.

Thavasianand Sankaranarayanan [Syncfusion]
Replied On August 17, 2017 04:12 PM UTC

Hi Luis, 

We have analyzed your query and we are unable to reproduce the reported issue from our end. But we suspect that you disable or enable dynamically the toolbar icon in Grid.  

We have already discuss about the above query in the following knowledge base documentation. 

If you still face the same issue then provide the following details for better assistance. 

  1. Exact scenario or proper replication procedure to reproduce the issue.
  2. Share video demonstration of the issue.
  3. Share full Grid code example.
  4. If possible share the sample or reproduce the issue in the previously attached sample.
  5. Essential Studio version.

Thavasianand S. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

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

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