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

How to stop loosing row/text formating in batchSave()?

I have a grid and Im changing the color of some rows when a cell button is clicked. The grid's edit mode is Batch. Every time i run batchSave() command it looses all the colours of coloured rows. Is there a way to keep row formatings while batchSave()?

$(args.target.closest("tr")).find('td').css("color", "red");

var obj = $("#EventItemsGrid").ejGrid("instance");

Thank you

1 Reply

VN Vignesh Natarajan Syncfusion Team February 27, 2019 07:41 AM UTC

Hi Kalum, 
Thanks for contacting Syncfusion support.  
Query: “Every time i run batchSave() command it looses all the colours of coloured rows 
From your query, we understand that you are facing issue with styles applied to row while using batchSave() method. By default while performing actions like sorting, filtering, editing , DOM elements will be refreshed once the process get over. So styles applied to elements during runtime will not be maintained. Hence reported issue occurred. To overcome the reported issue, we suggest you to apply styles using queryCellInfo event or rowDatabound event. So that once the certain operations gets over we will trigger those events and apply styles again. Or else you need to manually apply styles again to rows after saving the changes.    
Refer our API documentation for your reference 
Vignesh Natarajan.  

Live Chat Icon For mobile
Up arrow icon