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

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

Hi.

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.

3 Replies

TS Thavasianand Sankaranarayanan Syncfusion Team 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 () { 
            $("#Grid").ejGrid({ 
                // 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. 

Regards, 
Thavasianand S.


LC Luis Carlos 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.



TS Thavasianand Sankaranarayanan Syncfusion Team 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.


Regards, 
Thavasianand S. 


Loader.
Up arrow icon