ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: emontes on April 27, 2016, 06:23:36 pm

Title: Problem with checkbox
Post by: emontes on April 27, 2016, 06:23:36 pm
I have the following definition

{ title: "Visible", dataType: "integer", dataIndx: "visible", width: 20, align: "center",
          filter: { type: 'textbox', condition: 'equal', listeners: ['change']},
          type: 'checkbox',
          cb: {
              check: "1",
              uncheck: "0"
          }, 
         },   

When an item is unchecked and I try to check it everything works fine.  But when the Item is Uncheked and I chek it, the state is stored in the database, but the item does not appears checked in the pqgrid.  Am I doing something wrong?
Title: Re: Problem with checkbox
Post by: paramvir on April 27, 2016, 08:51:07 pm
My first guess it's because dataType is 'integer' in your column but you are trying to assign "1" and "0" which are strings.

Please try to use 1 and 0 with dataType: 'integer' or "1" and "0" with  dataType: 'string'

Kindly share a jsfiddle if still facing issues.