Grid Hidden Column is set as exportable by default for Pdf and Excel
The Grid Hidden Column should be set as exportable by default for Pdf and Excel.
The Grid Hidden Column should not be set as exportable by default for Pdf and Excel.
It would be beneficial if the Grid exposes a built-in option for explicitly setting an arrow indicator for selected rows similar to the following:
Bug report
When the data source of the grid is set to WebAPI, the Batch option is not available.
Reproduction of the problem
1. Set the DataSource to WebAPI()
2. Attempt to enable the Batch(true) option.
Description
Reproducible only with the latest version of the suite - 2019.3.1023. The Batch option is available in the 2019.3.917 version.
Environment
* **Kendo UI version:** 2019.3.1023
* **jQuery version:** 1.12.4
* **Browser:** [all]
column-command template does not access datasource as an ordinary column template.
<kendo-grid name="grid">
<columns>
<column field="ProductID" title="ID" />
<column title="Column" template="#=columnTemplate(data.ProductID)#" />
<column title="ColumnCommand">
<commands>
<column-command name="change" template="#=columnTemplate(data.ProductID)#"></column-command>
</commands>
</column>
</columns>
<datasource type="DataSourceTagHelperType.Custom" server-filtering="true">
<transport>
<read url="@Url.Action("ServerFiltering_GetProducts", "MultiSelect")" />
</transport>
</datasource>
</kendo-grid>
<script>
function columnTemplate(productID) {
if (productID % 2 == 0)
return 'even';
else
return 'odd';
}
</script>
Reproduction of the problem:
https://netcorerepl.telerik.com/myurdlbI16kA1TM213
Current behavior:
There is no way to have a dynamic template for column commands that depends on datasource.
Expected/desired behavior:
Having column-command template as column template, making it possible to access data from datasource.
Environment:
Kendo UI version: 2024.2.514
Workaround:
As an alternative solution, I'm using data-bound event, performing a for loop to all rows, but it needs to go line by line, which is not the best solution for large data.
Hi
I'm using the popup editor to edit rows in the grid.
I'm using following javascript method to open the popup:
function editSelectedRow(name) { var grid = $('#' + name).data('kendoGrid'); var rows = grid.select(); grid.editRow(rows[0]); }
This function is called when a row is double clicked:
$("#Binders tbody").on("dblclick", "tr[role='row']", function (e) { editSelectedRow("Binders"); });
I have this code for many years now and it was never a problem.
With the latest version of the grid this code fails (the popup doesn't open) upon making a change in the popup window. As long as no changes is done to the record in the popup, there will not be a problem.
The error received is the following:
jquery-3.7.1.min.js:2 jQuery.Deferred exception: Cannot read properties of undefined (reading 'id') TypeError: Cannot read properties of undefined (reading 'id')
at HTMLTableRowElement.<anonymous> (https://kendo.cdn.telerik.com/2024.1.319/js/kendo.all.min.js:9:1814199)
at Function.each (https://code.jquery.com/jquery-3.7.1.min.js:2:3129)
at Le.fn.init.each (https://code.jquery.com/jquery-3.7.1.min.js:2:1594)
at init._persistSelectedRows (https://kendo.cdn.telerik.com/2024.1.319/js/kendo.all.min.js:9:1814160)
at init.select (https://kendo.cdn.telerik.com/2024.1.319/js/kendo.all.min.js:9:1811103)
at init._displayRow (https://kendo.cdn.telerik.com/2024.1.319/js/kendo.all.min.js:9:1779176)
at https://kendo.cdn.telerik.com/2024.1.319/js/kendo.all.min.js:9:1894615
at Array.forEach (<anonymous>)
at init.refresh (https://kendo.cdn.telerik.com/2024.1.319/js/kendo.all.min.js:9:1894600)
at init.trigger (https://kendo.cdn.telerik.com/2024.1.319/js/kendo.all.min.js:9:4189) undefined
When the data in the grid is refreshed, no error will occur anymore.
HOWEVER... I also have an "Edit" button on the toolbar of the grid. That buttons uses the same 'editSelectedRow' function but when that button is used, the popup window will open, even after a change to the record!!
With other words... something goes wrong when double clicking a row after an update was made.
What has changed?
Best regards,
Peter
Filtering a column bound to a complex object throws a JavaScript error.
This is a regression introduced with v 2023.1.117
Uncaught TypeError: Cannot convert undefined or null to object
at Function.keys (<anonymous>)
at x (kendo.all.js:313050:21)
at init._createForm (kendo.all.js:313050:21)
at init._init (kendo.all.js:313050:21)
at init._click (kendo.all.js:313050:21)
at HTMLAnchorElement.dispatch (jquery.min.js:3:12445)
at r.handle (jquery.min.js:3:9174)
JavaScript error is thrown and the filter menu is not generated.
Filtering should work as expected.
At this stage, the ToolBar.Custom() API configuration does not expose built-in configurations for adding a handler and partial view. E.g:
@(Html.Kendo().Grid <TelerikAspNetCoreApp455.Models.OrderViewModel>()
.Name("grid")
.ToolBar(toolbar => {
toolbar.Custom().Name("Test1").ClientTemplateHandler("someHandler");
toolbar.Custom().Name("Test2").ClientTemplateView(Html.Partial("_Test2"))
})
...
)
The ToolBar.Custom() API configuration does not expose built-in configurations for adding a handler and partial view.
The ToolBar.Custom() API configuration should expose built-in configurations for adding a handler and partial view.
I have a model with configured Display and Required DataAnnotation.
However the TagHelper Grid doesn't serialize them because it is lacking a configuration property to bind to a Model like the HtmlHelper does:
@(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.CustomValidationProductViewModel>()
.Name("grid")
...
)
Can this capability be implemented for the TagHelper as well?
Grid PageSizes TagHelper attribute does not expose an IEnumerable overload
The Grid PageSizes TagHelper attribute exposes only an int[]
overload which prevents adding options such as "All".
In comparison to its HtmlHelper counterpart:
.Pageable(paging => paging.PageSizes(new object [] { 5, 10, 20, "All" }))
It would be a good idea to consider altering the page sizes to accept an IEnumerable overload.
Tooltip produces inconsistent behavior upon hovering when the content is configured through the content client-side configuration.
For every second hover, the Tooltip does not display the element's content.
For every second hover, the Tooltip should display the element's content.
The last checkbox selection is not disabled and allows all the columns to be removed if the menu options for the command column are explicitly set to false:
The last checkbox selection should be disabled without allowing all the columns to be removed if the menu options for the command column are explicitly set to false:
The following dojo depicts the aforementioned behavior.
In the latest version (2023.2.718), the Column Menu in the Grid faild to open if you set the Groupable option to false.
To reproduce the issue simply change the line below in the Grid Overview Demo
.Groupable(g=>g.ShowFooter(false))
to the following:
.Groupable(false)
https://netcorerepl.telerik.com/cxkhGOvU52pBO4NK33
The error you get when clicking on the Column Menu is:
Uncaught TypeError: Cannot read properties of undefined (reading '_canDrag') at init._updateGroupColumns (kendo.all.js:321370:19) at init._open (kendo.all.js:321370:19) at init.trigger (kendo.all.js:321370:19) at init._trigger (kendo.all.js:321370:19) at init.open (kendo.all.js:321370:19) at init.toggle (kendo.all.js:321370:19) at init._click (kendo.all.js:321370:19) at HTMLAnchorElement.dispatch (jquery.min.js:3:12445) at r.handle (jquery.min.js:3:9174)
Is it possible to add an option to enable/disable the valuePrimitive of the DropDownList editor of a Foreign Key column in the Grid? This way, the ForeignKey column can be configured to allow null values.
When a Grid's row is reordered and then the changes are saved - a Destroy request is sent to the server for the dataItem of the reordered row. This happens even though no changes are applied to dataItem of the reordered row.
The Grid should request the reordered item to be perished from the backend.
Group Paging is not working as expected when the Kendo UI Grid is populated from data deserialized from a file and multiple groups are defined.
Using the UI for ASP.NET Core Grid, populate it with a file, set GroupPaging to true, add more than one group, and set the default serialization:
builder.Services.AddControllersWithViews()
.AddJsonOptions(options =>
options.JsonSerializerOptions.PropertyNamingPolicy = null);
@(Html.Kendo().Grid<MyViewModel>()
.Name("grid")
.Groupable()
.Scrollable(s=>s.Virtual(true))
.DataSource(dataSource=>dataSource
.Ajax()
.GroupPaging(true)
.PageSize(50)
.Read("ReadFromFile", "HomeController")
.Group(x=>
{
x.Add(y=>y.Group1);
x.Add(y=>y.Group2);
})
)
//...)
With multiple groups, the follow error message will appear:
System.ArgumentNullException: Value cannot be null. (Parameter 'source')
at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
at Kendo.Mvc.Infrastructure.Group.InitializeSubgroups()
at SubgroupsGetter(Object )
at System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1.GetMemberAndWriteJson(Object obj, WriteStack& state, Utf8JsonWriter writer)
at System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryWrite(Utf8JsonWriter writer, T value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.JsonConverter`1.TryWriteAsObject(Utf8JsonWriter writer, Object value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.Converters.IEnumerableConverter`1.OnWriteResume(Utf8JsonWriter writer, TCollection value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.JsonCollectionConverter`2.OnTryWrite(Utf8JsonWriter writer, TCollection value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1.GetMemberAndWriteJson(Object obj, WriteStack& state, Utf8JsonWriter writer)
at System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryWrite(Utf8JsonWriter writer, T value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.JsonConverter`1.WriteCore(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.Serialization.JsonConverter`1.WriteCoreAsObject(Utf8JsonWriter writer, Object value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.JsonSerializer.WriteCore[TValue](JsonConverter jsonConverter, Utf8JsonWriter writer, TValue& value, JsonSerializerOptions options, WriteStack& state)
at System.Text.Json.JsonSerializer.WriteStreamAsync[TValue](Stream utf8Json, TValue value, JsonTypeInfo jsonTypeInfo, CancellationToken cancellationToken)
at System.Text.Json.JsonSerializer.WriteStreamAsync[TValue](Stream utf8Json, TValue value, JsonTypeInfo jsonTypeInfo, CancellationToken cancellationToken)
at System.Text.Json.JsonSerializer.WriteStreamAsync[TValue](Stream utf8Json, TValue value, JsonTypeInfo jsonTypeInfo, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Mvc.Infrastructure.SystemTextJsonResultExecutor.ExecuteAsync(ActionContext context, JsonResult result)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResultFilterAsync>g__Awaited|30_0[TFilter,TFilterAsync](ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
Server GroupPaging should work as expected with multiple groups and the default serialization that is delivered with ASP.NET Core. An example would be this live demo.
Use the Newtonsoft library to set the serialization options for the application:
builder.Services.AddControllersWithViews()
.AddNewtonsoftJson(options => options.SerializerSettings.ContractResolver = new Newtonsoft.Json.Serialization.DefaultContractResolver());
Grouping a column with Group Paging and Client Operations enabled results in slow performance in comparison to prior versions.
The grouping functionality for the Grid with client operations and group paging would produce approximately 10 times slower results in terms of execution. In comparison to previous versions.
The grouping functionality for the Grid with client operations and group paging should produce identical time execution to prior versions, as illustrated in the following dojo.
When a Grid that has a DateTime column is exported to Excel that column doesn't get its width automatically like columns bound to other types of data.
An explicit Width needs to be set for the DateTime column as evident in this Telerik REPL.
Could you please fix the columns.autoWidth of the kendo.ooxml.Workbook to work for all types of data?