- Home
- Forum
- ASP.NET Web Forms
- Page design view disable grid row double click and Hide toolbar add,edit button
Page design view disable grid row double click and Hide toolbar add,edit button
Hi
Page design view disable grid row double click and Hide toolbar add,edit button
<script type="text/javascript">
$('<%= Grid.ClientID %>').ejGrid({ AllowEditOnDblClick: false });
</script>
Thanks
Pratheep
SIGN IN To post a reply.
3 Replies
SA
Saravanan Arunachalam
Syncfusion Team
September 13, 2017 07:17 AM UTC
Hi Pratheep,
Thanks for contacting Syncfusion’s support.
We understood from your query, you need to prevent editing when double click the grid’s row and we have already discussed this query in the below documentation link.
We can disable row double click behavior by using allowEditOnDblClick propery of Grid editSettings. Please refer to the below code example and api reference link.
|
$('<%= Grid.ClientID %>').ejGrid({ editSettings: {allowEditOnDblClick: false }); |
If you want to hide the toolbar items for add and edit, we suggest you to remove the add and edit from the toolbar item list and define required items which you need. Please refer to the below code example and reference links.
|
<ej:Grid ID="FlatGrid" runat="server" AllowPaging="True" >
<ToolbarSettings ShowToolbar="true" ToolbarItems="delete"></ToolbarSettings>
. . .
</ej:Grid> |
Regards,
Saravanan A.
PR
Pratheep
September 14, 2017 02:33 AM UTC
Hi Saravanan
Thanks you for your support. working fine disable row double click .
it's possible Toolbar hide add,edit design view Jquery button click event
Thanks
Pratheep
SA
Saravanan Arunachalam
Syncfusion Team
September 14, 2017 08:42 AM UTC
Hi Pratheep,
We can dynamically remove the toolbar items by using either removeItem or removeItemByID method of ejToolbar. Please refer to the below code example and api reference link.
|
$("button").click(function(e){
//To Remove the item using removeItem method
$(".e-gridtoolbar").ejToolbar("removeItem", $(".e-gridtoolbar").find("li")[0])
//To Remove the item using removeItemByID method
$(".e-gridtoolbar").ejToolbar("removeItemByID", "Grid_edit");
})
|
If you want to disable/enable the toolbar items dynamically instead of removing the item, we suggest you to use the disableItem/enableItem method in the button click event. Please refer to the below api reference link to know more about above mentioned methods.
Regards,
Saravanan A.
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
PR Pratheep
- Sep 13, 2017 02:01 AM UTC
- Sep 14, 2017 08:42 AM UTC