Row updation is not working properly - grid refresh and apply CSSStlye for grid column in edit mode

Hi,

This is Indu. I hope you are doing good.

In syncfusion grid, I have one scenario which is explained below,
1.Grid: Inline Edit mode without toolbar option (Add, Edit, update, cancel).
2. only 2 fields are editable other columns are non-editable (setting allowediting = false done manually for each column except that 2 columns)
3. 1st editable control - DropDownEdit
HTML:

TS:

4. 2nd editable control - textbox
HTML:

TS:

5. Saving the edited values on their control change (dropdownlist)and blur/Enter key in keyboard(textbox) . It is saving data into the database.

Query 1: After updating the row how can I refresh the data source of the grid. Where can I do that? 
Ex: (a) - Grid onload

(b) after given values in editable columns (temporarily only it is showing data)

(c) if I am filtering the same record again, It is showing the updated data field empty. But it is affected in the database. When I am refreshing the whole page then it is showing data for the same record. Is there any way to show the data while filtering it?

Query 2: how to set "tick mark"(Refer the above image) while in edit mode? how can i add class in edit mode.
(a)"Attaching" column having "tick" symbol based on the given code below,
HTML:

(b) How can i show tick mark in row edit also? "Attaching" field is showing true. I want to show "tick" mark instead of "true".


Kindly do let me know the answers and solutions for the stated problems at the earliest.
Your reply is highly appreciated in this issue.
Thank you in Advance.


1 Reply

RS Rajapandiyan Settu Syncfusion Team April 6, 2020 12:27 PM UTC

Hi Indu,  
 
Greetings from Syncfusion support.  
 
Query – 1: “Edited value not updated on filtering in Grid”  
 
By default when data is modified and saved in the row, it will be automatically updated in the grid data source. If the grid data is fetched from a database please ensure this database is properly updated. We checked this problem from our end but unfortunately were unable to reproduce it as the updated value was properly shown on filtering. We have prepared a sample based on the code snippet you provided for your reference which you can find below,  
 
 
It would be helpful to identify your problem better if you could share the following information,  
  • By filtering the record - Are you performing normal Grid filtering or have you customized in your application-level to perform filtering operation in the Grid?
  • How have you bound data source to the Grid?
  • Video demonstration of the problem.
  • Syncfusion package version.
  • If possible provide us a simple sample to replicate the problem or try reproducing it in the above provided sample.
 
Note: If you are using older Syncfusion packages we suggest you to update to the latest version and check if this resolve the problem.  
 
 
Also if your requirement is to programmatically end the Grid edit and save the records then you can call the Grid’s endEdit method.  
  
  
Query – 2: “How to show tick mark rendered in column template in edit mode based on data’s Boolean values”  
 
From your query we are able to understand that you wish to render a checkbox column and enable editing for it. Since you have bound Boolean value to this column you can display it directly as Checkbox by setting the column’s displayAsCheckBox property to true. Now editing this checkbox column can be achieved by setting the column’s editType as ‘booleanedit’. This is demonstrated in the below code snippet,  
 
<e-column field='Attaching' headerText='Attaching' displayAsCheckBox=true editType='booleanedit' width='80'></e-column>  
 
Sample for your reference,  
 
 
 
Let us know if you have any concerns. 
 
Regards, 
Rajapandiyan S 


Loader.
Up arrow icon