在我的分貝我有值0和1(假,真)列ACTIFGridBooleanColumn數據首先由0和1,但沒有真假
我試圖用一列。布爾與我的數據庫值0和1 ...但它不起作用。
{
xtype: 'booleancolumn',
dataIndex: 'Actif',
text: 'MyBooleanColumn',
falseText: 'Non',
trueText: 'Oui'
}
請幫我:)
我的模型
Ext.define('ModuleGestion.model.UtilisateursApplicatifs', {
extend: 'Ext.data.Model',
fields: [
{
name: 'Nom'
},
{
name: 'Prenom'
},
{
name: 'Identification'
},
{
name: 'MotDePasse'
},
{
name: 'IUtilisateurApplicatif'
},
{
name: 'FonctionRepertoire'
},
{
name: 'FonctionAnimation'
},
{
name: 'FonctionFormation'
},
{
name: 'FonctionAdministration'
},
{
name: 'Actif'
}
]});
解決的辦法是刪除該值的回報的雙引號:
$resultat = json_encode($resultat);
$resultat = str_replace('"Actif":"0"', '"Actif":0', $resultat);
$resultat = str_replace('"Actif":"1"', '"Actif":1', $resultat);
你是什麼意思 「它不工作」? –
當他讀取顯示值不匹配的值0 = false和1 = true但仍然爲真 – VincentDA
編輯您的帖子以顯示您的模型定義,問題可能在那裏。 –