title: I am trying to show checkbox checked unchecked based on is active true false value from database in datatable but I am not able to do that
body: <p>I am trying to show checkbox checked unchecked from database value but I am not ablt to find any solution.Kindly help me in that.</p>
  
  <p>Below is the code I have tried</p>
  
  <pre><code>&lt;table class="table table-bordered table-striped" id="tblBrand"&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Brand Name&lt;/th&gt;
              &lt;th&gt;ISActive&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;&lt;/tbody&gt;
  &lt;/table&gt;
  
  &lt;script&gt;
      $(document).ready(function () {
  
          $.ajax({
              type: "GET",
              url: '@Url.Action("GetBrand", "Product")',
              dataType: "json",
              async: false,
              contentType: "application/json; charset=utf-8",
  
              success: function (result) {
  
  
                  var data = result.brandList;
                  BindBrand(data);
  
  
              }
      });
      });
  
  
  
      function BindBrand(msg) {
  
          var properties = {
              bProcessing: true,
              bDestroy: true,
              bSort: true,
              data: msg,
              aoColumns: [
                  { mData: 'GlobalCodeName' },
                  {
                      mData: "",
                      bSortable: false,
                      mRender: function (cellvalue, options, rowObject) {
                          if (rowObject.IsActive === true) {
                              $('input:checked');
                          }
  
  
                          debugger;
                          return '&lt;input id="checkid' + rowObject.GlobalCodeID + '" class="mycheckbox" type="checkbox" onchange="Updatecheckboxvalue(' + rowObject.GlobalCodeID + ');"&gt;&lt;/input&gt; ';
  
                      }
                  }
  
              ]
          };
          var table = $('#tblBrand').DataTable(properties);
  
  
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>Above is the code in view</p>
  
  <p>And Below is the code in controller</p>
  
  <pre><code>[HttpGet]
      public JsonResult GetBrand()
      {
          var finalResult = Common.GetProductBrand("1001");
          var JSONString = JsonConvert.SerializeObject(finalResult);
          var brandList = JsonConvert.DeserializeObject&lt;IEnumerable&lt;GlobalCodes&gt;&gt;(JSONString);
  
          //return Json(brandList, JsonRequestBehavior.AllowGet);
          return Json(new { brandList }, JsonRequestBehavior.AllowGet);
      }
  </code></pre>
  
  <p>I want that in my view Checkbox should be checked if IsActive column in my database is true and if it is false then checkbox values should be false</p>