Click here to Skip to main content
15,868,000 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I Created Grid,this code
(index.cshtml):
Razor
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_MyLayout.cshtml";
}
 @(Html.Kendo().Grid<Example.Urunler>()
      .Name("urunGrid") 
      .Columns(columns =>
      {
        
          columns.Bound(u => u.UrunAdi).Width(100).Title("Adı");
          columns.Bound(u => u.UrunAdeti).Width(100).Title("Adeti");
          columns.Bound(u => u.UrunFiyati).Width(100).Title("Fİyatı");
        
          columns.Command(commands =>
          {
             
              commands.Destroy(); 
          }).Width(200);
      })
 .ClientDetailTemplateId("template")
 .HtmlAttributes(new { style = "height:430px;" })
      .ToolBar(toolbar =>
      {
          toolbar.Create();
       toolbar.Save(); 
      })
    
      .Editable(editable => editable.Mode(Kendo.Mvc.UI.GridEditMode.InCell)) 
    .Reorderable(reorder=>reorder.Columns(true))
      .DataSource(dataSource =>
          dataSource.Ajax()
 
         .Batch(true) 
            .PageSize(5)
            .Model(model =>
            {
                model.Id(u => u.UrunID);
                model.Field(u => u.UrunID).Editable(true); 
            })
             .Create(create => create.Action("Urunler_Create", "Urunler"))
             .Read(read => read.Action("Urunler_Read", "Urunler"))  
             .Update(update => update.Action("Urunler_Update", "Urunler"))  
             .Destroy(destroy => destroy.Action("Urunler_Destroy", "Urunler"))
             
              
      )
.Events(events => events.DataBound("dataBound"))

      .Pageable(pageable =>
                  {
                      pageable.Refresh(true);
                      pageable.PageSizes(true);
                      pageable.PreviousNext(true);
                      pageable.Enabled(true);

                  })
                
      .Filterable()
      .Sortable()
      .Groupable()
      )

This code create Grid..I am clicking Save button return this page;
HTML
    {
Data: [
{
Faturalar: null,
Musteriler: null,
UrunID: 1,
UrunAdi: "deneme",
UrunAdeti: 12,
UrunFiyati: 12,
MusteriId: null
}
],
Total: 1,
AggregateResults: null,
Errors: null
}

There is a error here.How to return Grid page ?
Posted
Updated 10-May-15 5:31am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900