2013-10-21 99 views

回答

0

您可以發表你的格碼?

我也有這個問題。在我的情況下,容器ID與網格名稱相同。

+0

嗨威廉在我的情況下容器ID和網格名稱是不一樣的 – Bhavya

0
hi william here is the code the grid 


     @(Html.Kendo().Grid<iRPAS.Models.Covers.PolicyCoverDetail>(obj.listdetails) 

     .Name("ElectricalAccessories") 
         .HtmlAttributes(new { style = "width: 100%;" }) 
       //style = "width: 480px; height: 115px;" 
.Columns(columns => 
{ 

    //columns.Bound(p => p.PHIntField1).Width(50).Title("SlNo"); 
    columns.Bound(p => p.PHVarcharField4).Width(80).Title("Serial No"); 
    columns.Bound(p => p.PHVarcharField1).Width(100).Title("MakeModel"); 
    //columns.Bound(p => p.SumInsured).Width(150).ClientFooterTemplate("<Button onclick='ggg()'>GetSum</Button>"); 
    columns.Bound(p => p.PHVarcharField2).Width(100).Title("SumInsured"); 
    columns.Bound(p => p.PHVarcharField3).Width(100).Title("Description"); 
    columns.Command(command => { command.Edit(); command.Destroy(); }).Width(200); 

}) 
      .ToolBar(toolbar => 
{ 
    toolbar.Create().Text("Add"); 

}) 
.Editable(editable => editable.Mode(GridEditMode.InLine)) 

.Sortable() 
.Scrollable() 
.Filterable() 
.DataSource(dataSource => dataSource 
.Ajax().ServerOperation(false) 
.Batch(true) 
.Model(model => 
    { 
     model.Id(p => p.PHIntField1); 

    } 

) 
           .Create(update => update.Action("EditingInline_Create", "Policy")) 

                 .Update(update => update.Action("EditingInline_Update", "Policy")) 
               .Destroy(update => update.Action("EditingInline_Destroy", "Policy"))) 

                    .Events(e => 
                    { 
                     e.Save("GetSumElectricalAccessories"); 
                     e.Remove("EndRequest"); 
                    }) 



     ) 
相關問題