Hello!!!
I have a question!
I use this example:http://www.kendoui.com/code-library/mvc/grid/binding-to-datatable.aspx
Please show on this example how to edit object (row)
and next:
I have Model:
and Grid:
Why Grid dosn't want work with array(
How I can this do?
I have a question!
I use this example:http://www.kendoui.com/code-library/mvc/grid/binding-to-datatable.aspx
Please show on this example how to edit object (row)
and next:
I have Model:
public class ShrinkCoeffModel
{
[Display(Name = "thickness")]
public virtual int Thickness { get; set; }
[Display(Name = "wett")]
public virtual string[] Wetness { get; set; }
[Display(Name = "coeff")]
public virtual decimal[] Coeff { get; set; }
}
@(
Html.Kendo().Grid(Model)
.Name("ShrinkCoeff")
.ToolBar(commands =>
{
commands.Create();
})
.Columns(columns =>
{
columns.Bound(o => o.Thickness);
for (int i = 0; i <
Model.FirstOrDefault
().Wetness.Count(); i++)
{
columns.Bound(o => o.Wetness[i]);
}
columns.Command(command =>
{
command.Edit();
command.Destroy();
}).Width(210).Title("Действия");
})
.Editable(editable => editable.TemplateName("Item").Mode(GridEditMode.PopUp))
.DataSource(dataBinding => dataBinding
.Server()
.Model(model => model.Id(o => o.Thickness))
.Update("Edit", "ShrinkCoeff")
.Create("Create", "ShrinkCoeff")
.Destroy("Delete", "ShrinkCoeff"))
.Pageable()
.Sortable()
.Selectable()
)
How I can this do?
for (int i = 0; i <
Model.FirstOrDefault
().Wetness.Count(); i++)
{
columns.Bound(o => o.Wetness[i]);
}