J'ai une liste déroulante dans ma barre d'outils de ma grille. Je veux remplir la liste déroulante avec les noms de colonne de cette grille. Aucune suggestion?populate déroulant avec des colonnes de grille
@(Html.Kendo().Grid(Model)
.Name("Grid")
.Columns(columns =>
{
columns.Bound(p => p.Name).Groupable(false);
columns.Bound(p => p.FullName);
//columns.Command(commandAction: command => command.Custom("ViewDetails").Click("showDetails"));
})
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("Customers_read", "jvIndex"))
.PageSize(1)
)
.ToolBar(toolbar =>
{
toolbar.Template(@<text>
<div class="toolbar">
<input type="text" class="k-input"/>
@(Html.Kendo().DropDownList()
.Name("categories")
.OptionLabel("All")
.DataTextField("")
.DataValueField("")
.Events(e=>e.Change("categoriesChange"))
.BindTo()
)
<button class="k-button" id="get">Filter</button>
</div>
</text>);
})
.HtmlAttributes(new { style = "height: 430px" })
.Pageable()
.Sortable()
.Scrollable()
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.ServerOperation(false)
.Model(model => model.Id(p => p.Name))
.Read("ToolbarTemplate_Read", "jvIndex")
)
) )