Hi,
I've got an issue about handling my grid.
There was my first code :
I load my DataTable thanks to a library (so there is no model). When I change page grid, the display is ok.
I try to add a Selectable, in order to have information about the line to display a treeview with data.
So I add this :
But Visual said I have to add a DataSource. That's the first problem to me ...
Adding this in my .cshtml :
And this in my controller :
It's working, but my first column is DateTime type, so when I display my grid ... Date become "/Date(13633....)/"
Do you have a solution to avoid DataSource, or to display easily my data without broken everything ?
Second issue, when I add my Selectable, how can I have the id of the selected line in my controller ? I'd like to add those information in a treeview ...
Thanks,
Daniel
I've got an issue about handling my grid.
There was my first code :
@using System.Data@{ DataTable dataTable = ViewBag.DataSource;}@(Html.Kendo().Grid(dataTable) .Name("Logs") .Columns(columns => { foreach (DataColumn column in dataTable.Columns) { columns.Bound(column.DataType, column.ColumnName); } }) .Pageable() .Scrollable() .HtmlAttributes(new { style = "margin-top:30px; height:575px;" })
)I load my DataTable thanks to a library (so there is no model). When I change page grid, the display is ok.
I try to add a Selectable, in order to have information about the line to display a treeview with data.
So I add this :
.Selectable(selectable => selectable.Mode(GridSelectionMode.Multiple))Adding this in my .cshtml :
.DataSource(datasource => datasource .Ajax() .PageSize(10) .Read(read => read.Action("GetLogs","Home")))public ActionResult GetLogs([DataSourceRequest] DataSourceRequest request) { FormFilter filter = new FormFilter(); return Json(Reader.GetLog(filter).ToDataSourceResult(request)); }Do you have a solution to avoid DataSource, or to display easily my data without broken everything ?
Second issue, when I add my Selectable, how can I have the id of the selected line in my controller ? I'd like to add those information in a treeview ...
Thanks,
Daniel