Check documentation for the latest version of dhtmlxSuite Grid Specific HowTos DHTMLX Docs

Grid Specific HowTos

How can I define grid structure on the server side?

To define grid structure on the server side you need to:

  • create configuration object
var config = new dhtmlxGridConfiguration();
  • set required parameters
config.SetHeader("Item,#cspan");
config.AttachHeader("Sales,Title");
config.SetColIds("col1,col2");
...
  • and attach config to connector
connector.SetConfig(config);       
return connector;

For more information on the topics covered here, see the 'Grid configuration' guide.

How can I populate select/combo columns with data?

To define options of select/combo columns, you have 2 ways:

1) to load data from the same table, the grid is populated with data from

connector.ExplicitOptions.Add((TableField)"FieldName", "Alpha", "Beta", "Gamma");

2) to load data from another table

dhtmlxOptionsConnector filterConnector = new dhtmlxOptionsConnector(
    "Country", 
    "ISO", 
    connector.Request.Adapter
);
//attaches filter connector to first column of grid connector
gridConnector.OptionsConnectors.Add(
    connector.Request.RequestedFields[0], 
    filterConnector
);

For more information on this topic, see the 'Select/combobox columns in grid' article.

Back to top