jQWidgets Forums

jQuery UI Widgets Forums Editors CheckBox, RadioButton when variable is empty checkbox is checked

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 11 years, 4 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • pradeeplobo
    Participant

    hello,
    i am using jqwidgets. i have one problem with check boxes. when variable is empty then checkbox should be checked. and when variable is not empty then checkbox should not be checked. plz help me. my code:
    editable: true,
    columns: [
    { text: ‘Employee Name’, editable:false, datafield: ‘EmployeeName’, width: 250},
    { text: ‘Basic Salary’, editable:false, datafield: ‘BasicSalary’, width: 100 },
    { text: ‘Petrol Allowance’, editable:false, datafield: ‘PetrolAllowance’, width: 100 },
    { text: ‘Iban No’, datafield: ‘IbanNo’, editable:<?php print ($editflag) ?>, width: 200 },
    { text: ‘Is Cash’, datafield: ‘IsCash’, columntype: ‘checkbox’,width: 80 },
    { text: ‘Basic Salary’, editable:false, datafield: ‘EmployeeBasicSalary’, width: 100 }
    ]
    });
    });

    above when IbanNo(4th row) is empty IsCash(5th row checkbox) should be checked. in the same way when IbanNo is not empty IsCash should be unchecked.

    Thank you


    Peter Stoev
    Keymaster

    Hi pradeeplobo,

    The checkbox column displays Boolean values i.e your cells should have values either True or False. Example: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/cellediting.htm?arctic

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.