ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: ohbayashi on March 28, 2017, 11:12:16 am
-
MySql
table floor_status
field visble_flag tinyint //0:false, 1:true
↓
PHP GET
↓
ParamQuery...
grid
colModel...
{ dataIndx: "visible_flag", dataType: "bool", type: "checkbox" },...
↓
| visible | ...
|---|...
| 0 |... <= I want to display as 0=true(checked), 1=false(unchecked)
↓
PHP POST <= false=0 or true=1
-
tinyint (0,1) to boolean(true, false) can be cast in dataModel.getData callback as
data.forEach(function(rd){
rd.visible_flag = !!rd.visible_flag;
});
-
Thank you!
I could do it.