Hello, I have a two-dimensional string array that I want to bind to kendo mvc grid. It contains two rows. It's able to display the first row as Header, but it's no not showing the second row. Following is my code for the view which receives the said two-dim string array:
@using Kendo.Mvc.UI
@model string[][]
@if (Model != null)
{
var grid = Html.Kendo().Grid<dynamic>(Model)
.Name("importGridHeader")
.Columns(columns =>
{
var row = Model[0];
foreach (var col in row)
{
columns.Bound(col).Width(200);
}
}
)
.HtmlAttributes(new { style = "min-height: 450px; max-height:1250px;" })
.Sortable()
.Scrollable(s => s.Enabled(true))
.Resizable(r => r.Columns(true))
.Filterable()
.DataSource(dataSource => dataSource
.Ajax()
.ServerOperation(false)
);
grid.Render();
}
@using Kendo.Mvc.UI
@model string[][]
@if (Model != null)
{
var grid = Html.Kendo().Grid<dynamic>(Model)
.Name("importGridHeader")
.Columns(columns =>
{
var row = Model[0];
foreach (var col in row)
{
columns.Bound(col).Width(200);
}
}
)
.HtmlAttributes(new { style = "min-height: 450px; max-height:1250px;" })
.Sortable()
.Scrollable(s => s.Enabled(true))
.Resizable(r => r.Columns(true))
.Filterable()
.DataSource(dataSource => dataSource
.Ajax()
.ServerOperation(false)
);
grid.Render();
}