Option grouping |
Docs
Using the OptionGroup column property allows you to take advantage of the native select option grouping capability |
Loading...
Razor code
var productSelect = new SelectModel(DataSourceType.SQLite, "Northwind", "Products join Categories on Products.CategoryID = Categories.CategoryID") { Searchable = true };
productSelect.Columns = new List()
{
new SelectColumn("ProductID"),
new SelectColumn("ProductName"),
new SelectColumn("CategoryName") {OptionGroup = true}
};
@(await new DbNetSuiteCore.SelectControl(HttpContext).Render(productSelect))