Hi,
I am filling the grid with List of model objet,Inside that each model object again i will be having a list of other model object ,i want show few columns in the grid by using the list which is inside the main Model.
Because of the below foreach i am getting the error.
@(Html.Kendo().Grid(Model)
.Name("Grid")
.Columns(columns =>
{
columns.Bound(ViewModel => ViewModel.name).Title("name");
foreach (var sec in Model)
{
for (int i = 0; i < sec.SecurityIdentifierModel.Count; i++)
{
string columnName = sec.SecurityIdentifierModel[i].IdentifierType;
columns.Bound(securityViewModel => securityViewModel.SecurityIdentifierModel[i].Identifier).Title(columnName);
}
}
})
.DataSource(dataSource => dataSource
.Server()
.Model(model => model.Id(o => o.Identifier)))
)
Thanks in advance...
I am filling the grid with List of model objet,Inside that each model object again i will be having a list of other model object ,i want show few columns in the grid by using the list which is inside the main Model.
Because of the below foreach i am getting the error.
@(Html.Kendo().Grid(Model)
.Name("Grid")
.Columns(columns =>
{
columns.Bound(ViewModel => ViewModel.name).Title("name");
foreach (var sec in Model)
{
for (int i = 0; i < sec.SecurityIdentifierModel.Count; i++)
{
string columnName = sec.SecurityIdentifierModel[i].IdentifierType;
columns.Bound(securityViewModel => securityViewModel.SecurityIdentifierModel[i].Identifier).Title(columnName);
}
}
})
.DataSource(dataSource => dataSource
.Server()
.Model(model => model.Id(o => o.Identifier)))
)
Thanks in advance...