Loading status of checkbox via XML not honoured

When initially loading a tree containing checkboxes where it is desired to set the status on load it appears that setting a checkbox to false is not effected.

if($rslt){ while($row = sqlsrv_fetch_array( $rslt, SQLSRV_FETCH_ASSOC)){ //create xml tag for grid's row if ($row['StatusCode'] === 'C') { $stf = 0; }else{ $stf = 1; } echo ('<item text="' .$row['Status']. '" id="stc-' .$row['StatusCode']. '" checked="' . $stf . '"/>'); }
indicates desired results in XML

<item text="Status" id="status" checked="-1"> <item text="[Null]" id="stc-Null" checked="1"/> <item text="Approved" id="stc-A" checked="1"/> <item text="Completed" id="stc-C" checked="0"/> <item text="Ongoing" id="stc-O" checked="1"/> <item text="Released" id="stc-R" checked="1"/> <item text="Unassigned" id="stc-U" checked="1"/> </item>


Unfortunately, the documentation here [url]http://www.dhtmlx.com/docs/products/docsExplorer/doc/dhtmlxxml/xmlTree.html[/url] does not show unckecked example.

Despite numeric values (1, -1) being valid for checked and tri-state respectively it appears that 0 (zero) is not a valid value - use false, False, null or Null for not checked.

if ($row['StatusCode'] === 'C') { $stf = false; }else{ $stf = 1; }

Something to be addressed in future release?

If you don’t want to set checkbox state, you don’t need to use an attribute “checked”.