Quantcast
Viewing all articles
Browse latest Browse all 82110

Checkboxes on an Editor Form - checkbox state is flipped

Hi folks, I'm using the DataTables.net Editor. One of my fields is a checkbox, and I define it as such:

{
   "dataProp": "IsAssociated",
   "label":"Is assigned",
   "name":"IsAssociated",
   "type": "checkbox",
   "ipOpts": [
      {
         "label": "",
         "value": ""
      }
    ],
    "separator": ""
},
....

I'm loading my DataTable from an AJAX source. The JSON data coming across for this checkbox field is transmitted as "True" or "False" (not "1" or "0"). This is what my WCF service serializes a boolean as.

My problem is that in my Editor form, False values are giving the checkbox a checkmark, and True values do NOT have a checkmark. Can anyone tell me what might be wrong with my field declaration above? Or where else I might investigate?

From the docs, it looks like there can be multiple checkboxes that are mutually exclusive and used like radio buttons, but that's not what I'm trying to do. I just need to represent a boolean value. Thanks in advance!

Edit: Allan, we're doing a lot with DataTables.net, the Editor, and .NET (particularly with WCF services). Would you be interested in posting any of our basic examples for the .NET world? If so, let me know at rob _at_ ironhorsesoftware.com.

Viewing all articles
Browse latest Browse all 82110

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>