Author Topic: How to make a check box non-editable?  (Read 2345 times)

bsolteam

  • Pro Deluxe
  • Full Member
  • *
  • Posts: 107
    • View Profile
How to make a check box non-editable?
« on: August 22, 2014, 05:09:28 pm »
Hi,
I am using check box for displaying some grid table based on the check box selection. I want to restrict the selection of check boxes ie. at least one check box must be checked from all of them. If i will try to unchecked the last check box, it should not be happen .One check box must appear.  We can select more than one .

Thanks

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6296
    • View Profile
Re: How to make a check box non-editable?
« Reply #1 on: August 25, 2014, 05:39:35 pm »
Please refer to this demo

http://paramquery.com/demos/selection_custom

Before unselection of row ( line number 78 and 99 ), check whether it's the only remaining selection by iterating over
dataModel.data[ i ] [ dataIndx ]

where i varies from 0 to dataModel.data.length
and dataIndx is name of field holding state of selection.