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