Categories | Question details Back To List | ||||||||
DHTLMX Tree : Radio Button not showing as selected Hi there, I am not able to show the radio button as selected while creating tree from following XML file. It directly goes to the last radio button i.e to this node --> "<item text="Deception Point" id="db_5" />" as selected instead of this node "<item text="AryaS" id="db_2" checked="1"/>" even after writing checked="1". please help. <?xml version='1.0' encoding='iso-8859-1'?> <tree id="0" > <item text="Books" id="books" im0="folderClosed.gif" im1="folderOpen.gif" im2="folderClosed.gif" call="1" select="1" checked="1" > <item text="Horror" id="horror" im0="folderClosed.gif" im1="folderOpen.gif" im2="folderClosed.gif" open="1" select="1"> <item text="Stephen King" id="sk" im0="folderClosed.gif" im1="folderOpen.gif" im2="folderClosed.gif"></item> <item text="Dan Brown" id="db" im0="folderClosed.gif" im1="folderOpen.gif" im2="folderClosed.gif" open="true" radio="1"> <item text="Angels & Demons" id="db_1"/> <item text="AryaS" id="db_2" checked="1"/> <item text="Digital Fortress" id="db_3" /> <item text="The Da Vinci Code" id="db_4" /> <item text="Deception Point" id="db_5" /> </item> <item text="Mary Janice Davidson" id="mjd" im0="folderClosed.gif" im1="folderOpen.gif" im2="folderClosed.gif" checked="1"></item> <item text="Katie Macalister" id="km" im0="folderClosed.gif" im1="folderOpen.gif" im2="folderClosed.gif" checked="1"></item> </item> <item text="Science Fiction & Fantasy" id="fantasy" im0="folderClosed.gif" im1="folderOpen.gif" im2="folderClosed.gif"> <item text="Audrey Niffenegger" id="af" im0="folderClosed.gif" im1="folderOpen.gif" im2="folderClosed.gif"></item> <item text="Philip Roth" id="pr" im0="folderClosed.gif" im1="folderOpen.gif" im2="folderClosed.gif" checked=""></item> </item> </item> </tree> Answer posted by Support on Jul 22, 2008 07:21 Problem cant be reconstructed locally, the same xml file works correctly - please check attached sample. If problem still occurs for you - please provide any kind of sample where issue can be reconstructed ( you can send sample directly to support@dhtmlx.com ) Attachments (1)
Answer posted on Jul 22, 2008 08:31 Will this work with threestatecheck ?????? Answer posted on Jul 22, 2008 09:23 The same sample will work correctly with 3-state checkboxes as well. Just add tree.enableThreeStateCheckboxes(true) In common case, usage of radio buttons with three state checkboxes can be problematic ( radio buttons also will be incuded in 3-state logic, so they may change their value based on selected state of parent|child items ) |