The current version of Kendo UI no longer allows you to align column headings as described in the demo https://demos.telerik.com/kendo-ui/grid/cell-alignment
It occurs because a nested tag (k-link) is set as display: flex;
You can see an example of it on your own demo site (link above) - Ship City header should be centered but isn't.
{
field: "ShipCity",
title: "Ship City",
headerAttributes: { style: "text-align: center" },
attributes: { style: "text-align: right" }
}
When the columns.sortable.initialDirection configuration is set it is not respected
columns: [{
field: "id",
sortable: {
initialDirection: "desc"
}
}],
Note the userId column is not sorted in descending order
Column should be sorted in descending order
Use the dataSource sort configuration option to set the sort order - example
Currently if the grid has its selection mode set to a "single" row, the user ca select one row on each page. The "single" row selection should be global, not page specific.
Reported in ticket 1550865
Run the following example:
https://dojo.telerik.com/@gdenchev/aToMonEy
Select a row on the first page. Go to the second page and select another row. Go back to the first page. The row is still selected, even though we selected a different row on page 2.
Currently the user can select one row on each page.
If a row is selected, all other rows across all pages, should be deselected.
A workaround is provided in the following Dojo example:
https://dojo.telerik.com/@PMcDonou/oWOyIpAg
Hi Team,
I'd like to request the functionality to change the format of a Kendo UI Grid column without needing to call the setOptions method. This would be nice to avoid additional Read calls.
Thank you!
Hello,
A couple feature requests...
Clear the built in search box value.
clearSearch - clears the search box
e.g.,
var grid = $("#grid").data("kendoGrid");
grid.clearSearch();
Customize validation text via schema model fields validation.
e.g.,
var grid = $("#grid").data("kendoGrid");
const dataSource = new (<any>self).kendo.data.DataSource({
data: models,
schema: {
model: {
id: "id",
fields: {
id: { editable: false, nullable: true },
modelName: { validation: { required: true, messages: {required: "Model name is a required field"} } },...
We are using kendo Datagrid where we wanted to apply pagination.
We are using pageSizes property of pageable object to set the no of items per page to render. We are also using buttonCount property to control the number of buttons.
Problem : For example I have 200 records , if I set pagesSizes=1 so technically I will have 200 paging button and if i set buttonCount to 60 than UI gets distorted. Find below is stackblitz URL where I have set pagesSizes=1 and if you set Maximum number of buttons = 70 UI will break.
URL : https://cuezkg--run.stackblitz.io/
There's a discrepancy between the header and rest of the rows when the selected rows are coppied and pasted in Excel.
When using specific themes for a scrollable Kendo UI Grid which have long titles within the column header, the sort icon are partially shown or not shown.
The sort icon is not shown upon sorting.
The sort icon should be shown as expected with every theme.
Hi Team,
I would like to request the functionality to easily modify group and sub group headers with specific templates for aggregation, and have it built-in to the API. For example, the group header could contain the total within the large group, and the sub group would contain each individual section. Additionally, it would be nice to be able to reference each to better select each section.
Thank you!
You guys do such a great job of allowing us to extend your product for our needs. And I know that you have recently added the Search Panel to allow us to perform a search against the dataSource. However, I would like to put that search box/button somewhere else completely on my page.
I've been able to get around this by using the code in kendo.grid.js to use my own click/keypress events to invoke the filter based on the new search options.
configureSearch takes two jQuery selector strings to hook into click/keypress events. I only want to search when the user hits ENTER instead of after each keypress. Then it executes the private search function.configureSearch(inputSelector: string, clickSelector: string) {
const searchFn = this.search;
if (this.grid.options.search == null) {
throw "search field(s) not set for grid.";
}
const inputElement = $(inputSelector).keypress(function (this: HTMLElement, e) {
const keycode = (e.keyCode ? e.keyCode : e.which);
if (keycode === 13) {
searchFn($(this));
}
});
$(clickSelector).click(e => {
searchFn(inputElement);
});
}
private search(inputElement: JQuery<HTMLElement>) {
const options = this.grid.options;
const dsOptions = this.dataSource.options as kendo.ui.GridScrollable; // HACK: dataSource.options isn't really a GridScrollable, but it's similar
let searchFields: string[] | any = options.search ? options.search.fields : null;
let expression: kendo.data.DataSourceFilters = {
filters: [],
logic: "or"
};
const value = inputElement.val();
if (!searchFields) {
searchFields = getColumnsFields(options.columns);
}
// NOTE: Thankfully we don't use endless
if (dsOptions.endless) {
dsOptions.endless = null;
//(this as any)._endlessPageSize = this.dataSource.options.pageSize;
}
if (value) {
for (let i = 0; i < searchFields.length; i++) {
expression.filters.push({
field: searchFields[i],
operator: "contains",
value: value
});
}
} else {
expression = {};
}
this.dataSource.filter(expression);
// from Telerik:
function leafColumns(columns: kendo.ui.GridColumn[]): kendo.ui.GridColumn[] {
/* Hiding ... go see Telerik source code */
}
function getColumnsFields(columns: kendo.ui.GridColumn[]): string[] {
/* Hiding ... go see Telerik source code */
}
}
Hi Team,
I would like to request the Kendo UI Grid to allow virtual scrolling with smaller pagesizes. I understand right now it is a limitation, but I would like to see this functionality in the future if possible.
Thank you!
Hi,
The buttons And/Or in the column menu filter are not translated. They are in English even if the language is set to Swedish.
This is only when componentType is set to "modern". When it is set to "classic" the button language is correct.
See Dojo and attached screenshots.
Hi Team,
I would like to request to set the Grid's toolbar overflow to visible or a way to modify it's configuration within the API rather than it's current configuration to allow Kendo UI Menu items and other dropdown components from hiding behind the Grid body.
For now, I'm using the following:
.k-grid-toolbar {
overflow:visible;
}
Thank you!
We are using the functionality included with the grid (mvc and .net core) to save and set filters, sorts and groupbys. Where the functionality fails is if the grid or columns change in any way (including toolbars). the getoptions() and setoptions() is a snapshot in time and is not very adaptive. Our users had 1000's of saved grids and was really not allowing us to change the grid data or columns or even change the default order of the columns. What we ended up doing to allow the saved grids to work and the developers to have the freedom to change the grids was:
1. Getting the grid that is passed down to the screen and saving it for a clear functionality (and knowing what the default was supposed to be).
2. Looking at the sort, groupby and filter subcomponents of the saved grid objects by column and looking for a column match in the grid that was passed to the screen.
3. If a column in the saved grid does not exist, do not apply those filters, sorts and groupby's and alert the user
4. Only apply/change the filters, sorts and groupbys via a setOptions() on the grid that is passed down as opposed to a set of the entire object.
6. If a column is added to the grid alert the user that the column is added
7. If the grid has changed, use a getOptions() to resave the users selections with the modifications above
8. Load the data
We have javascript that does the column compare, with differences in the grid if your developers would like to see how we solved this issue.
Hi Team,
I would like to ask for the functionality to access the worksheet tabs to be able to format/change the contents of them. I understand the title can be set, but I would like to be able to change the background color.
Thank you!
Create grid as groupable and try to set column title as "<span class='glyphicon glyphicon-cloud'></span>"
$("#grid").kendoGrid({
groupable: true,
columns: [{
field: "name",
title: "<span class='glyphicon glyphicon-cloud'></span>"
//, groupable: false
}, {
field: "age",
title: "Age"
}]
});
Expected result - column title as glyphicon glyphicon-cloud but actual is wrong
To fix the problem - set up column as groupable: false (just uncomment) and title will be ok
But if I want to use such title and groupable: true - I cannot
Full example:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Kendo UI Snippet</title>
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2021.3.914/styles/kendo.default-v2.min.css"/>
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2021.3.914/js/kendo.all.min.js"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>
<body>
<div id="grid"></div>
<script>
$("#grid").kendoGrid({
groupable: true,
columns: [{
field: "name",
title: "<span class='glyphicon glyphicon-cloud'></span>"
//, groupable: false
}, {
field: "age",
title: "Age"
}]
});
</script>
</body>
and on dojo: https://dojo.telerik.com/EWUnarUf/2
Hi Team,
I'd like to request the functionality to include event handlers and/or functions with the kendo.Stringify() method. I understand event handlers are not included in JSON.stringify, but I would like to ask for future implementation from Kendo to be able to include them.
Thank you!