To define grid structure on the server side you need to:
var config = new dhtmlxGridConfiguration();
config.SetHeader("Item,#cspan");
config.AttachHeader("Sales,Title");
config.SetColIds("col1,col2");
...
connector.SetConfig(config);
return connector;
For more information on the topics covered here, see the 'Grid configuration' guide.
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