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

Template Refresh for the Boolean Checkbox in Batch Edit

Thread ID:

Created:

Updated:

Platform:

Replies:

124858 Jul 5,2016 04:36 AM UTC Jul 6,2016 08:50 AM UTC ASP.NET MVC 1
loading
Tags: Grid
Ajay
Asked On July 5, 2016 04:36 AM UTC

Hi,

I've a boolean column that displays as checkbox in my grid which has batch edit enabled. I'm using the Javascript API method setCellValue to update all the records to true but the grid displays true instead of a checked checkbox.

Should I be refreshing template? I've tried it but no success.


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

   for (var i = 0; i < obj.model.currentViewData.length; i++) {

        obj.setCellValue(i, "Status", true)//updating each cell of Status to true

   }


Regards,

Ajay


Prasanna Kumar Viswanathan [Syncfusion]
Replied On July 6, 2016 08:50 AM UTC

Hi Ajay, 
 
Thanks for contacting Syncfusion support. 
 
In Essential Studio Version 14.1.0.46  we face the mentioned issue while using setCellValue method of ejGrid. We have already fixed the issue and fix has been included in the 14.2.0.26 version.  So, we suggest you to upgrade to the latest Essential studio version. 
 
Find the code example and sample: 
 
 
@(Html.EJ().Grid<object>("Editing") 
        .Datasource((IEnumerable<object>)ViewBag.dataSource) 
        .EditSettings(edit => { edit.AllowAdding().AllowDeleting().AllowEditing().EditMode(EditMode.Batch); }) 
        ------------------------ 
        .ClientSideEvents(eve => { eve.Create("context"); }) 
        ---------------------------- 
) 
 
<script> 
    function context(args) { 
        var obj = $("#Editing").ejGrid("instance"); 
        for (var i = 0; i < obj.model.currentViewData.length; i++) { 
            obj.setCellValue(i, "Verified", true)//updating each cell of Status to true 
        } 
    } 
</script> 
 
 
Regards, 
Prasanna Kumar N.S.V 
 
  


CONFIRMATION

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.

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

;