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

[Solved] Grid commands problem

0 Answers 26 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.
Alexey
Top achievements
Rank 1
Alexey asked on 20 Jun 2012, 04:40 PM
Hello!
I've got a problem while trying to use standard commands for rows (Delete, Edit).
MissingMethodException in runtime: Cannot create an abstract class in layout when debug starts

View:
@(Html.Telerik().Grid((IEnumerable<Dir.Object>)ViewBag.ObjList)
    .Name("StdObjList")
    .DataKeys(dataKeys => dataKeys.Add(c => c.id))
    .DataBinding(dataBinding => dataBinding
        .Server()
            .Delete("Delete", "StdObj")
    )
    .Columns(columns =>
    {
        columns.Bound(c => c.id)
        columns.Bound(c => c.FullName);
        columns.Command(commands =>
        {
            commands.Delete().ButtonType(GridButtonType.Image);
        }).Width(200);

    })
)

Action:
[Telerik.Web.Mvc.GridAction]
        public ActionResult Delete()
        {
            return View();
        }

scripts
@(Html.Telerik().ScriptRegistrar()
        .jQuery(true)
        .Scripts(
            scripts => scripts
                .AddGroup("HeadScripts",
                    group => group
                        .DefaultPath("~/Content/scripts/telerik")
                            .Add("jquery-1.7.1.min.js")
                        .DefaultPath("~/Content/scripts")
                            .Add("jquery.validate.min.js")
                            .Add("jquery.validate.unobtrusive.min.js")
                            .Add("jquery.cluetip.min.js")
                            .Add("default-ui.js")
                        .Enabled(true)
                        .Combined(true)
                        .Compress(true)
                )
        )
        .DefaultGroup(
            group => group
                .DefaultPath("~/Content/scripts/telerik")
                .Enabled(false)
                .Combined(true)
                .Compress(true)
        )
    )

Thanks for help
Tags
Grid
Asked by
Alexey
Top achievements
Rank 1
Share this question
or