First of all I have to say that I've searched this forum for this issue and found many threads but none of them helped me to solve my problem that's why I've decided to start new one.
What I'm trying to accomplish here is to use my database column with 2 distinct string values ("T","N") as the source for the field in ListGrid displayed as checkbox.
This field is declared as:
My datasource is bound to ListGrid and DynamicForm.
DynamicForm works as expected: displays checkbox, checked for "T" and unchecked for "N", updates properly and so on...
ListGrid, however, doesn't work as expected:
- in the filter it displays checkbox and filtering works fine
- in the display mode it shows true/false (no checkbox)
- in the edit mode it displays checkbox checked regardless of the current field value and if updated sends "true"/"false" strings to database
To be honest I'm puzzled by inconsistency of the behaviour between ListGrid and DynamicForm. Is it intentional behaviour or bug?
If it's intentional how do I make ListGrid to display checkboxes and work properly in edit mode?
I will appreciate any help on this.
Regards,
tlas
What I'm trying to accomplish here is to use my database column with 2 distinct string values ("T","N") as the source for the field in ListGrid displayed as checkbox.
This field is declared as:
Code:
<field name="GABARYTOWANIE">
<valueMap>
<value id="T">true</value>
<value id="N">false</value>
</valueMap>
<editorType>CheckboxItem</editorType>
</field>
DynamicForm works as expected: displays checkbox, checked for "T" and unchecked for "N", updates properly and so on...
ListGrid, however, doesn't work as expected:
- in the filter it displays checkbox and filtering works fine
- in the display mode it shows true/false (no checkbox)
- in the edit mode it displays checkbox checked regardless of the current field value and if updated sends "true"/"false" strings to database
To be honest I'm puzzled by inconsistency of the behaviour between ListGrid and DynamicForm. Is it intentional behaviour or bug?
If it's intentional how do I make ListGrid to display checkboxes and work properly in edit mode?
I will appreciate any help on this.
Regards,
tlas
Comment