Check documentation for the latest version of dhtmlxSuite Select/Combobox Columns in Grid DHTMLX Docs

Select/Combobox Columns in Grid

When on the client side you specify co/coro/combo columns (combo-box/select) in the grid, the grid will automatically request data for them in the same manner as for the filtering options.

By default, the grid will use DISTINCT select against the related field, and fetch all possible options.

If you need to define a custom list of options, you can use one of 2 ways:

  • a hardcoded list
<cfset param = structNew()>
<cfset param["1"] = "one">
<cfset param["2"] = "two">
<cfset param["3"] = "three">
<!--- param[value] = label --->
<cfset grid.set_options("item_nm",param)> 
<cfset grid.render_table("grid50","item_id","item_nm,item_cd")>
  • a list created on the base of a different table
<cfset list = createObject(
<cfset list.render_table(
<cfset grid.set_options("item_nm",list)>
<cfset grid.render_table("grid50","item_id","item_nm,item_cd")>

co/combo type

  • when using the predefined list of data, both values and labels need to be provided
  • when using the connector, there must be two fields selected, one as (value), second as (label)

coro type:

  • only labels need to be provided
  • the connector may define only the label parameter
Back to top