Author Topic: Checkboxes in checkbox column do not check.  (Read 3304 times)

ralph1996

  • Pro Ultimate
  • Jr. Member
  • *
  • Posts: 80
    • View Profile
Checkboxes in checkbox column do not check.
« on: September 27, 2016, 01:51:25 am »
I am sure I am missing something, but cannot seem to get the checkbox column to work. Clicking on the boxes do not select them.  I saw another post where the issue was editable set to false on the column - but that did not resolve my issue.  I am assuming I have something conflicting.  Here is a jsFiddle showing the issue:

http://jsfiddle.net/uhrhg2cv/4/

Thanks.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Checkboxes in checkbox column do not check.
« Reply #1 on: September 27, 2016, 07:41:05 pm »
Use "cb":{ header: true, select: true, all: true, check: 'true', uncheck: '' },

instead of

"cb":{ header: true, select: true, all: true, checked: 'true', unchecked: '' },

ralph1996

  • Pro Ultimate
  • Jr. Member
  • *
  • Posts: 80
    • View Profile
Re: Checkboxes in checkbox column do not check.
« Reply #2 on: September 28, 2016, 03:37:09 am »
Admitedly that was kind of a silly mistake, however I tried it on the jsFiddle and it did not solve the issue.  I had previously tried many other combinations - like using bool type for the checkboxes, omitting the check and uncheck states etc.  None of those worked either.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Checkboxes in checkbox column do not check.
« Reply #3 on: September 28, 2016, 08:37:34 am »
It's because of pqobj.editable = false;

Please check this: http://jsfiddle.net/uhrhg2cv/5/


ralph1996

  • Pro Ultimate
  • Jr. Member
  • *
  • Posts: 80
    • View Profile
Re: Checkboxes in checkbox column do not check.
« Reply #4 on: September 28, 2016, 10:13:13 pm »
AH, yes I had tried this before but I think I must have had an error in the column definition (editable: "true" as opposed to editable: true) which probably caused it to fail).  The reason I set it to false in the grid was looking at this post on the forum (http://paramquery.com/forum/index.php?topic=1322.msg5988#msg5988) which stated it was setting the grid object editable to false and the column editable to true.  However if you examine the jsFiddle in that post they actually omit the editable on the grid - which defaults to true.  I missed this teh first time though and assumed what they said in the post was accurate.

Anyway, thank you for the clarification it is working now.