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

How to implement editing in telerik grid using mvc3 as in the url:

0 Answers 45 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.
vinkesh
Top achievements
Rank 1
vinkesh asked on 07 Jul 2011, 08:11 AM

a)     (http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/alleditablecolumns/defaultcs.aspx)

my code will be be like this


on controller.cs

public ActionResult Index()
        {
          
            ViewBag.Message = "Welcome to ASP.NET MVC!";
            var tme = new db_TestEntities();
            ViewData["tb_TestMvc"] = tme.tb_TestMvc.ToList();
           
            return View();
        }

on index.cshtml ity will be like this

@(Html.Telerik().Grid<TelerikMvcApplication1.Models.tb_TestMvc>()
.BindTo((List<TelerikMvcApplication1.Models.tb_TestMvc>)ViewData["tb_TestMvc"])
        .Name("Grid")
              .Columns(columns =>
              {
                  columns.Bound(p => p.Id).Width(210);
                  columns.Bound(p => p.ContactTitle).Width(130).Format("{0:c}");
                  columns.Bound(p => p.ContactName).Width(130).Format("{0:N}");
                  columns.Bound(p => p.Country).Width(130).Format("{0:d}");
                  columns.Command(commands => commands.Edit()).Title("Edit");
                   })
      .Sortable()
      .Pageable()
          )

please send me solution

Tags
Grid
Asked by
vinkesh
Top achievements
Rank 1
Share this question
or