Checkbox

Checkbox

estudiosestudios Posts: 52Questions: 0Answers: 0
edited April 2014 in Editor
Dear all
I have the following rows in Editor

"label": "Acount",
"name": "cdo",
"type": "checkbox",
"ipOpts": [
{ "label": "", "value": "1" }
],
"default": 0

But I need it readonly, just need to show the state of the field with the checkbox. ¿Is that possible? ¿how?

Thanks to all

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    You could use the `node()` method and a little bit of jQuery like this:

    [code]
    $('input', editor.node( 'cdo' )).prop( 'readonly', true );
    [/code]

    Allan
  • estudiosestudios Posts: 52Questions: 0Answers: 0
    thanks, it works perfect
    I did also include this in the table
    { "mData": "contabilizado", "mRender": function (data, type, full ) {
    if (data == 1)
    {
    return '';
    }
    else
    {
    return '';
    }
    }
    }
    and works ok, just for someone else need the same support
This discussion has been closed.