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
close icon

Enable Grid Edit on Single Click

Hi,

It´s possible to enable the inline edit of the Grid on Single Click, set the default behavior for editing instead of selecting a row. ?

Thanks in advance

3 Replies

MS Mani Sankar Durai Syncfusion Team October 13, 2016 11:48 AM UTC

Hi Dayne, 


Thanks for contacting Syncfusion support. 

We have analyzed your query and achieved your requirement by using recordClick event in grid.   

Please refer the below code example. 
[Index.cshtml] 
 
@(Html.EJ().Grid<object>("FlatGrid") 
 
        .Columns(col => 
        { 
 
}) 
        .ClientSideEvents(eve=> eve.RecordClick("click")) 
        ) 
 
<script type="text/javascript"> 
    function click(args) { 
        if (this.model.editSettings.editMode == "normal") { 
            this.startEdit(args.row);  //trigger to edit the row 
        } 
    } 
</script> 

In the above code example, we have done inline editing for grid while single click the record by calling the startEdit method in recordClick event of grid. 


We have also prepared a sample that can be downloaded from the below link. 


Note: It is not feasible to set the inline editing in a single click. If you need to edit a record in a single click, then we suggest you to use batchEditing which is similar to excel like editing. 


Please refer the documentation link and online sample link. 


Also please refer the documentation link for the following events. 


Please let us know if you need further assistance. 


Regards, 
Manisankar Durai. 



DA Dayne October 13, 2016 05:53 PM UTC

Hi,

This solution works just fine


MS Mani Sankar Durai Syncfusion Team October 14, 2016 11:16 AM UTC

Hi Dayne, 

Thanks for your feedback. 

Please get back to use if you need further assistance. 

Regards, 
Manisankar Durai. 


Loader.
Live Chat Icon For mobile
Up arrow icon