Grid Inline Edit with checkbox selection

As per title I am trying to create a grid with local data, my goals are to be able to modify the data and to select the rows that will be transmitted to the server for elaboration.

My problems are:
  • I need multiple selection, I added a checkbox column, and enabled CheckboxOnly, problem is, when I double click on a row to edit, my selection are reset.

  • Another issue is, I have some boolean column I managed to displayAsCheckBox, which works, I want the inline edit to be able to see the column as checkboxes all the time, when I enter edit mode the checkboxes are reset to text even using ediType="CheckBox"

You can find an example attached.

Attachment: example_7e47ab00.zip

4 Replies

MA Matteo March 5, 2020 01:05 PM UTC

I solved the second problem myself, the solution is editType="booleanedit".



RS Rajapandiyan Settu Syncfusion Team March 5, 2020 02:06 PM UTC

Hi Matteo, 

We are glad that you have resolved the second query. Please find the response of another query below. 

Query : I need multiple selection, I added a checkbox column, and enabled CheckboxOnly, problem is, when I double click on a row to edit, my selection are reset. 
 
From your provided details we could see that you are having grid with checkBoxOnly selection and need to maintain the selection while on editing the record. To achieve your requirement we suggest you to set the persistSelection as true in the selectionSettings. When enabling the persistSelection it maintains the selected records after the grid action like Editing, Paging, etc., please refer the below code example and sample for more information. 
 
 
selectionSettings = { checkboxOnly: true, persistSelection: true }; // if it is enabled, selections are maintained after the grid actions. 
 
 
 

Please get back to us if you need further assistance on this. 

Regards, 
Rajapandiyan S. 



MA Matteo March 5, 2020 02:36 PM UTC

It works, thank you!

I have two more issues:

  • The first is: when I enter edit mode the checkboxes rappresenting the booleans are allways checked, even when the value is false

  • The second is: I am working with local data, I am feeding a javascript to the grid, when I edit a row, I am not able to see my update. Neither my variable nor the datasource are updated.
Greetings
Matteo


RS Rajapandiyan Settu Syncfusion Team March 6, 2020 02:08 PM UTC

Hi Matteo, 
 
Thanks for your update. 
 
Query #1: The first is: when I enter edit mode the checkboxes rappresenting the booleans are allways checked, even when the value is false 
 
We are able to reproduce the reported issue at our end. We have confirmed and logged defect report for the same “Boolean edit is not working properly when the grid having checkbox type column”. At Syncfusion, we are committed to fixing all validated defects (subject to technological feasibility and Product Development Life Cycle ) and including the defect fix in our next patch release which is expected to be rolled out on or before 18th March, 2020. 
 
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link. 
 

Query #2:  I am not able to see my update. Neither my variable nor the datasource are updated. 

In the grid all the crud operation depends on the primaryKeyColumn. To affect the edited data in the grid we need to set isPrimaryKey as true for anyone of the unique column in the grid. 
 
   
If you still face the problem, please get back to us with following details. 

  1. Share the full grid code.
  2. Share any video demonstration of the reported problem.
  3. Syncfusion package version used.
 
Regards, 
Rajapandiyan S. 


Loader.
Up arrow icon