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

Page design view disable grid row double click and Hide toolbar add,edit button

Thread ID:

Created:

Updated:

Platform:

Replies:

132629 Sep 13,2017 02:01 AM UTC Sep 14,2017 08:42 AM UTC ASP.NET Web Forms 3
loading
Tags: Grid
Pratheep
Asked On September 13, 2017 02:01 AM UTC



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

Saravanan Arunachalam [Syncfusion]
Replied On 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. 


Pratheep
Replied On 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




Saravanan Arunachalam [Syncfusion]
Replied On 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. 


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

;