0
votes

HI I have telerik mvc grid in ajax mode and editing is enabled. In my scenario i have to use only the insert mode so I disabled the edit mode. but when I run i get the javascript error on click of "Add New Record". Sample project can be downloaded from Here

3

3 Answers

1
votes

I got this to work by the following:

function GridNotes_onEdit(e) {
    $('#Content').after("<a class='t-button t-grid-cancel t-button-icon' href='#'><span class='t-icon t-cancel'/></a>")
        .after("<a class='t-button t-grid-insert t-button-icon' href='#'><span class='t-icon t-insert'/></a>");
}

Now, this worked when I only had one field being inserted. If you have multiple columns, you may need to customize it to your specifications. But it is do-able. As well, it worked in a detail view grid.

Hope this helps...

0
votes

If you are looking for an official support channel as you provided a sample project, post your request to the telerik MVC forums on their site.

0
votes

Had the same issue. The answer is in-line needs the edit buttons to be there, so with in-line mode the insert breaks

This link covers this and has a fix.

http://www.telerik.com/community/forums/aspnet-mvc/grid/insert-only-with-server-editing.aspx