DHTMLX Docs & Samples Explorer

List of initialization properties

Common initialization options

  • parent - string or object, id of container, where tree will be initialized, mandatory
  • name - {string} name which will be assigned to related html input
  • width - {string} - width of combo ( can be defined in pixels or percents )
  • type - type of options used in combo, optional
  • index - tab index assigned to control, optional
  • filter - {boolean} switch between combobox and auto-filter modes(enableFilteringMode)
  • auto_height - {boolean} enables or disables list auto height(enableOptionAutoHeight)
  • auto_position - {boolean} enables or disables options auto positioning(enableOptionAutoPositioning)
  • auto_width - {boolean} enables or disables options auto width(enableOptionAutoWidth)
  • xml - {string} url of data file (loadXML)
  • readonly - {boolean} switch to readonly mode(readonly)

Options of combo

Options of combo can be defined through items collection

    combo = new dhtmlXCombo({
       parent:"combo_container",
       items:[
            { value:"1", text:"One" },
            { value:"2", text:"Two" },
            { value:"3", text:"Three" }
       ]
    });

Each option can have next attributes

  • value - {string} value of option
  • label - {string} text which will be shown for the option
  • css - {string} style string which can be assigned to option

Events

any event can be assigned by using property equal to event name

	combo = new dhtmlXCombo({
		parent:"combo_container",
		onChange:function(){
			alert("I'm changed");	
		}
	});