0

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 Answers 3

1

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...

Sign up to request clarification or add additional context in comments.

1 Comment

I had to modify the code a bit to get it working in my situation. I used $('.t-grid-new-row td:nth-child(6)').html('< class... in the OnEdit function, where the 6 (1 based) was the column I wanted to put my buttons.
0

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.

1 Comment

the link is from there post but got no response yet :(
0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.