Hi all,
I've a dynamic grid (no columns defined). I want to allow the user to change the text in the column header. Ideally, I'd like the user to click the column menu, select Rename. A modal will appear prompting them for the new column title. They enter text, click OK, and that title is applied to the selected column. Any thoughts how I can achieve that?
If it's any help, below is my Razor code that generates the grid.
Thanks in advance!
Steve.
@(Html.Kendo().Grid<
dynamic
>()
.Name("StandardTable_" + Model.InstanceKey)
.ToolBar(toolbar =>
{
toolbar.Template(@<
text
>
@ToolbarTemplate()
</
text
>);
})
.Resizable(resize => resize.Columns(true))
.Pageable(pageable => pageable
.Input(true)
.Refresh(true)
.PageSizes(true)
.ButtonCount(5)
.Enabled(true)
.Numeric(false)
).ColumnMenu()
.Sortable(s => s.SortMode(GridSortMode.MultipleColumn).AllowUnsort(true))
.Filterable()
.Groupable()
.Reorderable(reorder => reorder.Columns(true))
.EnableCustomBinding(true)
.Events(m => m.DataBound("pan.dashDatapart.getGridState(" + Model.DataPart?.DatapartKey + "," + Model.InstanceKey + ")"))
.DataSource(d => d
.Ajax()
.PageSize(pageSize)
.Read(read => read
.Action("StandardTableRead", "DashDataparts").Data("pan.dashDatapart.StandardGridRead(" + Model.DataPart?.DatafeedKey + "," + Model.InstanceKey + ")")
)
)
)