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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

It's possible Jquery hide toolbar or disable toolbar items

Thread ID:

Created:

Updated:

Platform:

Replies:

128176 Jan 6,2017 05:32 AM UTC Jan 10,2017 12:01 PM UTC ASP.NET Web Forms 3
loading
Tags: Grid
Pratheep
Asked On January 6, 2017 05:32 AM UTC

Hi

It's possible Jquery hide toolbar or disable toolbar items ( add,edit,delete,update,cancel)

  <ToolbarSettings ShowToolbar="True" ToolbarItems="add,edit,delete,update,cancel"></ToolbarSettings>


Thanks

Pratheep



Prasanna Kumar Viswanathan [Syncfusion]
Replied On January 9, 2017 12:58 PM UTC

Hi Pratheep, 

Thanks for contacting Syncfusion support. 

Yes, it is possible to hide the toolbarItems in grid. In this sample at initial rendering we get the toolbar instance and  hide the toolbarItems using hide method of ejToolbar.  

Find the code example and sample:  


<asp:ScriptManager ID="ScriptManager1" runat="server" /> 
    <ej:Grid ID="Grid" runat="server" AllowPaging="True" AllowResizing="true"> 
        <Columns> 
               ------------------------------------ 
           </Columns> 
          <EditSettings AllowEditing="True" AllowAdding="True" AllowDeleting="True"></EditSettings> 
          <ToolbarSettings ShowToolbar="True" ToolbarItems="add,edit,delete,update,cancel"></ToolbarSettings> 
           
        </ej:Grid>  
 
<script type="text/javascript"> 
    $(function () { 
        var toolbar1 = $('#<%= Grid.ClientID + "_toolbarItems" %>').data("ejToolbar"); 
        $(toolbar1.items).hide(); 
    }); 
</script> 


Refer to the Help document of hide method. 

  
If you need to hide the particular toolbar item , use below code example: 
 
 
<script type="text/javascript"> 
    $(function () { 
        var toolbar1 = $('#<%= Grid.ClientID + "_toolbarItems" %>').data("ejToolbar"); 
        $(toolbar1.items[0]).hide(); 
    }); 
</script> 
 
 
Regards, 
Prasanna Kumar N.S.V 
 


Pratheep
Replied On January 9, 2017 08:12 PM UTC

Hi Prasanna 

Thank you for your support.Working fine

Thanks
Pratheep

Thavasianand Sankaranarayanan [Syncfusion]
Replied On January 10, 2017 12:01 PM UTC

Hi Pratheep, 
 
We are happy that the problem has been solved. 
Please get back to us if you need any further assistance.  
 
Regards, 
Thavasianand S. 


CONFIRMATION

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.

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

;