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

Single click grid in batchmode

Thread ID:





149422 Nov 26,2019 12:06 AM UTC Nov 26,2019 09:23 AM UTC Blazor 1
Tags: Grid
Armando Costa
Asked On November 26, 2019 12:06 AM UTC

Is it possible to make edit a cell with single click or just writing when on focus  ?

Renjith Singh Rajendran [Syncfusion]
Replied On November 26, 2019 09:23 AM UTC

Hi Armando, 

Thanks for contacting Syncfusion support. 

To edit a particular cell with Batch mode of editing in Grid, we suggest you to use the “EditCell” method to achieve single click editing in Grid. You can make the cell to editable in a single click, by enabling the “SelectionMode” as “Both” and bind the “CellSelected” event to Grid. And in that handler call the “EditCell” method based on the clicked cell. We have prepared a sample based on this requirement for your convenience, please download the sample form the link below, 

Please use the below codes, 
<EjsGrid @ref="GridInstance" AllowPaging="true" DataSource="@Orders" Toolbar="@(new List<string>() { "Cancel", "Update" })"> 
    <GridSelectionSettings Mode="Syncfusion.EJ2.Blazor.Grids.SelectionMode.Both" ></GridSelectionSettings>           @*Set the SelectionMode as Both*@ 
    <GridEditSettings AllowEditing="true" Mode="EditMode.Batch"></GridEditSettings> 
    <GridEvents CellSelected="CellSelectHandler" TValue="OrdersDetails"></GridEvents>       @*Bind CellSelected event*@ 
    public static EjsGrid<OrdersDetails> GridInstance { get; set; } 
   public async void CellSelectHandler(CellSelectEventArgs<OrdersDetails> args) 
        var EditCellIndex = JsonConvert.DeserializeObject<Dictionary<string, object>>(args.CellIndex.ToString()); 
        var CurrentEditCellIndex = 0; 
        var CurrentEditRowIndex = 0; 
       foreach (var key in EditCellIndex)                  //Fetch the currently clicked cell details 
            if (key.Key == "rowIndex") 
                CurrentEditRowIndex = Convert.ToInt32(key.Value);                      //Fetch the row index 
            if (key.Key == "cellIndex") 
                CurrentEditCellIndex = Convert.ToInt32(key.Value);                    //Fetch the column index 
        var fied = await GridInstance.GetColumnFieldNames();                                  //Get the name of fields in Grid 
        GridInstance.EditCell(CurrentEditRowIndex, fied[CurrentEditCellIndex]);              //Call the “EditCell” method 

Please get back to us if you need further assistance. 

Renjith Singh Rajendran. 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon