Please implement native DateTimeOffset support to the filtering and sorting in the MVC Kendo grid.
Support for NullDisplayText property of the DisplayFormat metadata attribute.
When endless scrolling is implemented, manual DataSource operations using the DataSource APIs(query, page, sort, etc.) do not work as expected. The endless scrolling settings are causing paging issues.
The first page is only accessible, and when scrolling down the reads continue to occur.
The endless scrolling settings should not interfere with manual dataSource operations.
kendo.ui.Pager.fn._refreshClick = function (e) {
e.preventDefault();
var grid = $("#grid").getKendoGrid();
grid.dataSource.options.endless = null;
grid._endlessPageSize = 20;
grid.dataSource.pageSize(20);
}
kendo.ui.Pager.fn._refreshClick = function (e) {
e.preventDefault();
var grid = $("#grid").getKendoGrid();
window.restoreScroll = true;
window.scolledValue = grid.content[0].scrollTop;
grid.dataSource._data.empty();
grid.dataSource._pristineData = [];
grid.dataSource.read();
}
I use getOptions() and setOptions() to persist the state of the ajax bound grid that I have.
My toolbar is not a server one, it is this:
.ToolBar(toolbar =>toolbar.Create().HtmlAttributes(new { @class ="k-primary"}))
When I call the setOptions() method, it removes the Add button from the grid header.
Hello,
I think there is a bug with the DataTimeOffset field when used in a Grid. It cannot display correctly and is showing something like /Date(1364927400000)/. I have to retrieve my data from database as DateTimeOffset format and then use a new ViewModel to convert the DateTimeOffset values to DateTime values. This is really annoying.
Could you let me know if there is a way a DateTimeOffset field can be supported in the grid? Sometimes you do have to display the time zone info.
I hope this can be fixed in a future release.
Thanks,
Sam
When the Grid is set initially with a sort operation, the icon for the column will show twice in a UI for ASP.NET MVC web application.
Using the Kendo UI Grid template, add the sorting configuration to the dataSource:
@(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.OrderViewModel>()
.Name("grid")
.Columns(columns => {
columns.Bound(p => p.OrderID).Filterable(false).Width(200);
columns.Bound(p => p.Freight).Width(100);
columns.Bound(p => p.OrderDate).Format("{0:MM/dd/yyyy}").Width(140);
columns.Bound(p => p.ShipName);
columns.Bound(p => p.ShipCity).Width(150);
})
.Pageable()
.Sortable()
.Scrollable()
.Filterable()
.HtmlAttributes(new { style = "height:430px;" })
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
.Sort(s => s.Add("OrderID").Descending())) //Added Predefined Sort
)
The icon should only appear once for the sorted column.
It would be great if we could use the built in column filtering on columns containing arrays.
Or at the very least have a workaround (which I have not been able to find on the site).
I understand that the current implementation relies on the data being flat, but support for the following situation would be great:
- Grid cell is bound to an array and a template is used to display character delimited data (ie. One, two, three, four).
- Column filtering will display multi select options for the data.
We are using the Kendo UI for different components like Grid in our APS.Net MVC application. Currently we are experiencing an issue while exporting the Kendo grid to Excel from mobile (both android and ios). It shows the following warning message. The same works when exporting from a PC without any issue. Could you please help to resolve the issue.
Implement stacking columns on smaller screens, e.g., https://docs.telerik.com/devtools/aspnet-ajax/knowledge-base/grid-stack-responsive-columns-on-small-screens
When I use a grid, I can enable Filterable and the column shows me when I am filtering it; however if I enable ColumnMenu I have no indication if I am filtering on that column. We've used a work around to handle this state ourselves, but its ugly and I think this should be part of the core product.
@(Html.Kendo().Grid<ShipmentGrid>()
.Name("grid")
.AutoBind(false)
.Columns(columns =>
{
columns.Template(@<text></text>).Width(50).Title("PDFs").ClientTemplate($"<a href='javascript:" + jsPage + $".openDocumentWindow(#=AccountId#, #=OrderNumber#, #=OrderLineId#, #=OrderLineNumber#)'><img src={Url.Content("~/Content/images/pdficon_small.png")} /></a>");
columns.Bound(m => m.CustomerName).Width(200).Title("Customer").HeaderTemplate("Customer <span style='float:center' class='k-icon k-i-filter'></span>").Filterable(f => f.Multi(true).Search(true)).Sortable(true);
columns.Bound(m => m.PurchaseOrderNumber).Width(100).Title("PO").HeaderTemplate("PO <span style='float:center' class='k-icon k-i-filter'></span>").Filterable(f => f.Multi(true).Search(true)).Sortable(true);
})
.HtmlAttributes(new { style = "font-size:0.85em;" })
.Filterable()
.ColumnMenu()
.Reorderable(reorder => reorder.Columns(true))
.Resizable(r => r.Columns(true))
.Scrollable(s => s.Height(340))
.Pageable(pageable => pageable
.Refresh(true).ButtonCount(10)
.PageSizes(new [] { 25, 250, 2500 })
)
.Sortable(sortable => sortable
.SortMode(GridSortMode.SingleColumn)
)
.ClientDetailTemplateId("itemdetail")
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Url("/api/shipments").Data(jsPage + ".getParameters"))
.PageSize(2500)
.ServerOperation(false)
.Events(events => events
.Error(jsPage + ".GridService.onError")
.RequestStart(jsPage + ".GridService.onRequestStart")
.RequestEnd(jsPage + ".GridService.onRequestEnd")
)
)
.NoRecords()
.Events(events => events.DataBound(jsPage + ".onDataBound"))
)
Dragging a row from a Grid to another empty Grid is not working.
The row is not inserted in the empty Grid
The row should be inserted in the empty Grid.
Currently, the autoFitColumn() method shouldn't be used to resize all columns in a large grid, as noted here: https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/methods/autofitcolumn
Could this performance be improved by deferring the width calculation? So a 10 column grid could be completely autoFit with 1 calculation instead of 10.
Could an .AutoFit(true) method be added to the GridColumnBuilder's Fluent Api?
This would allow me to build columns such as:
.Columns(column => column.Bound(model => model.Value).AutoFit())
This should defer the autofit calculations so that they can be run once for all auto-fitted columns, rather than re-calculating for every column.
In other words, this should NOT simply call autoFitColumn() as it is currently implemented.
When a UI for ASP.NET MVC Grid contains a PDF or Excel button within the Toolbar, the IconClass is being ignored.
.ToolBar(t => t.Excel().Text("Export to Excel").IconClass("icon here"))
The specific icon should be added based on the IconClass.
Implement an option to control the columns width in scenarios that involve resizing the browser window.
Currently, if you specify the width of all the columns, on resizing the browser window the columns automatically resize proportionally. A column property MaxWidth would be nice to have, since it would prevent columns from resizing beyond a specified width value.
Reproducible with a Grid nested in the content of the tab, or loaded in the tab through AJAX.
Dojo example: https://dojo.telerik.com/eJuHaTan
The rows cannot be reordered.
The rows can be reordered.
Bug report
PersistSelection does not work when GroupPaging is enabled. Error is thrown: "Cannot read property 'Id' of undefined"
Reproduction of the problem
Dojo: https://dojo.telerik.com/aKixuZAy
Expected/desired behavior
No error shall be thrown and rows should be persisted when GroupPaging is enabled
Environment
Kendo UI version: 2020.2.617
Browser: [all]
I was try to upgrade Telerik UI for Asp.Net to 2020.2.513 form 2019.3.1023 ,but after I done the upgrade ,
the checkbox in the grid was disappeared with nothing change in my code.
I use the simple function columns.Select(), it seems the <label for='xxx#' class='k-checkbox-label k-no-text'></label> no been build.
Is there anything I need to do after upgrade ?