This question is locked. New answers and comments are not allowed.
I need custom grid behavior on client side: on press Add button, grid create new row in InLine mode, and on press Add2 button, grid create new row in InForm mode, with additional functionality. I add new custom command in toolbar and call javascript function Add2, where try change grid edit mode. But edit mode not changed, new row created in InLine mode. What I do wrong, and in general, is it possible?
Thanks in advance for your reply.
<script type="text/javascript"> function Add2() { var grid = $('#Property').data('tGrid'); grid.editing.mode = 'InForm'; grid.addRow(); }</script>Html.Telerik().Grid<Models.PropertyTypeModel>().Name("Property") // skip .DataBinding(dataBinding => { dataBinding.Ajax() .Select("_PropertySelect", "Options", new { oid = "<#= OptionTypeID #>" }) // skip }) .ToolBar(commands => { commands.Insert().ButtonType(GridButtonType.ImageAndText); commands.Custom().Text("Add2").Url("javascript:void(0)").HtmlAttributes(new { onclick = "Add2()" }); }) .Editable(editing => editing .Mode(GridEditMode.InLine) ))Thanks in advance for your reply.