Categories | Question details Back To List | ||
dhtmlXComboFromSelect with Checkboxes Hi, Is there a way in DHTMLX to create a dhtmlXComboFromSelect with checkboxes for each option in the select box. Tried using var z=dhtmlXComboFromSelect("inv",100, "checkbox"); This never works. But, this works: var z=new dhtmlXCombo("combo_zone3","alfa3",200,'checkbox'); I dont need to create a new combo box but make the existing one with checkboxes for every option in the combo box. Regards, Kumar. Answer posted by Support on Jan 19, 2009 08:31 You can use <select opt_type="checkbox" ... Such select will convert to combo with checkboxes. Answer posted by kumar on Jan 19, 2009 10:18 Thanks, also is there any way dhtmlx can mimic the multi selects, how can this be achieved..?
Regards, Kumar. Answer posted by kumar on Jan 19, 2009 14:01 Well, let me rephrase the question: var z=dhtmlXComboFromSelect("abc",195); I have an external button which when clicked, should expand the dhtmlx combo box. What would be the equivalent code to call this...help is appreciated. Answer posted by Support on Jan 20, 2009 08:36 >>dhtmlx can mimic the multi selects Combo works only in single select mode, checkboxes usage can give some additional possibilities , but it is not a true multi-select >>I have an external button which when clicked, should expand the dhtmlx combo box var combo = dhtmlXComboFromSelect("abc",195); .... <input type="button" onclick="combo.openSelect()" value"open"> Answer posted by kumar on Jan 20, 2009 09:09 So, is there any way to achieve multi select behaviour using combo? If not, what would be the best alternative to achieve this.. Answer posted by Support on Jan 20, 2009 09:16 There is no way to achieve multi-select functionality in combo. Combo with checkboxes allow to check multiple options , but still it not related to current text in input, and need to be get|set through separate API Answer posted by kumar on Jan 20, 2009 10:02 So, do any one have this working external API (get/set) to retrieve checkbox selections in a combobox? Thnx. Answer posted by Support on Jan 22, 2009 06:22 With latest version of dhtmlxcombo ( build 81107 , maybe earlier builds as well ) you will be able to use combo.getChecked() - return an array, which contains values of all checked elements combo.setChecked(index,mode) - check checkbox for item at specified index ( uncheck if mode is false ) |