This is a migrated thread and some comments may be shown as answers.

[Solved] Problem with Edit(), Delete() commands with Ajax Editing

4 Answers 125 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
David
Top achievements
Rank 1
David asked on 09 Nov 2010, 01:57 AM
Hello, I am looking at the following http://www.telerik.com/help/aspnet-mvc/telerik-ui-components-grid-editing-ajax-editing.html

<%= Html.Telerik().Grid(Model)
        .Name("Grid")
        .Columns(columns =>
        {
            //Bound columns
            columns.Bound(c => c.ContactName);
            columns.Bound(c => c.Country);
            columns.Bound(c => c.BirthDay);
            //Command column with two commands
            columns.Command(commands => commands
                   .Edit()
                   .Delete())
        })
%>
But when I write this code, it doesn't recognize the second command, the .Delete() - it seems I can only define Edit or Delete, once right after the second commands reference. After the . after the first Edit() command, I have the following options: ButtonType(), Equals(), GetHashCode(), GetType(), HtmlAttributes(), ImageHtmlAttributes() and ToString() It says "The editing feature of Telerik Grid for ASP.NET MVC is available only for ASP.NET MVC 2.0. Make sure you are using the right version of Telerik.Web.Mvc.Dll." How do I do this ? What else could be wrong ?

4 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 09 Nov 2010, 08:08 AM
Hello David,

 As the error suggests grid editing requires ASP.NET MVC 2 application and the MVC 2 build of Telerik.Web.Mvc.dll (found in bin\mvc2 in the installation folder).

Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
David
Top achievements
Rank 1
answered on 09 Nov 2010, 11:30 PM
I checked and confirmed that I am referencing the MVC2 dll, still have the same problem
0
Atanas Korchev
Telerik team
answered on 10 Nov 2010, 08:00 AM
Hello David,

This exception is thrown if you are not using the right build. I suggest you send us a sample application which demonstrates the problem so we can check what went wrong.

Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
dani
Top achievements
Rank 1
answered on 12 Jan 2011, 10:22 AM
I have the exact same problem here.
Working on MVC2, with the latest telerik dll (2010.3.1110.235, v2.0.50727)

Here is the right way to do it:
c.Command(commands =>
                                {
                                    commands.Edit();
                                    commands.Delete();
                                });
Tags
Grid
Asked by
David
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
David
Top achievements
Rank 1
dani
Top achievements
Rank 1
Share this question
or