Kendo Binding to DataTable with additional custom column
Someone pointed me to Kendo Bind to Data Table, which has this code in the
grid builder:
.Columns(columns =>
{
foreach (System.Data.DataColumn column in Model.Columns)
{
columns.Bound(column.ColumnName);
}
})
This works, but I also want to add an "edit" column, so I added this line
before the foreach:
columns.Command(command =>
command.Edit().Text("Edit").UpdateText("Submit")).Width(70).HtmlAttributes(new
{ style = "text-align: right;" });
which throws "Templates can be used only with field access, property
access, single-dimension array index, or single-parameter custom indexer
expressions."
How can I add an Edit column?
No comments:
Post a Comment