I have a Kendo MVC Grid
@(Html.Kendo().Grid<...>() .... .Editable(ed => ed.Mode(GridEditMode.PopUp).TemplateName("Editor_Name_A").Window(w => { w.Title(""); w.Width(700); }).DisplayDeleteConfirmation(false)) .DataSource(dataSource => dataSource ...
I have another two simple buttons: button_A
and button_B
somewhere else in the document, and what I am trying to do is, when user click button_A
, the grid will use template Editor_Name_A
, while if user click button_B
, the grid will use template Editor_Name_B
It is like dynamically setting / changing the grid edit template conditionally, is there any way to achieve it?
You will probably have to do it with some javascript in the page itself and try these approaches:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.