By default, when the "paste" command is added, the default option is "insert" mode ("Paste (Insert)"). Is it possible to add an option that allows setting the default paste mode to "replace" ("Paste (Replace)")?
Currently, when using the default Grid search functionality and the column filter menus, we observe the following:
However, there’s a specific scenario where this does not work properly:
For example:
This functionality behaves correctly in the Telerik UI for Blazor Grid component - the search and column filters are managed as separate objects.
Is it possible to enhance the Grid filtering similar to the Blazor Grid?
Hi, is there a way to configure the grid so that when it's grouped and later sorted, the grouping state (expanded/collapsed) is preserved?
Kind Regards
Erwin
It would be convenient to have built-in MultiColumnComboBox editing for the Grid.
I was hoping the component would show the addresses formatted in columns (as per a fields list) and then return the address concatenated into a single to the grid field (e.g. from .DataTextField("FullAddress")).
I'm in the process of rewriting all Kendo components to use CSP compatible templates. I'm looking at https://docs.telerik.com/aspnet-core/html-helpers/template/overview which shows how we'd use TemplateComponentName() for popup editors and that we would need to rewrite everything in the popup editor to use Kendo Template's AddHtml or AddComponent methods.
Original:
<div class="mb-2 row required">
@Html.LabelFor(model => model.FileName, new { @class = "col-sm-4 col-form-label fw-bold text-sm-end" })
<div class="col-sm-6">
@(Html.Kendo().TextBoxFor(model => model.FileName).HtmlAttributes(new { @class = "w-100" }))
</div>
</div>
<div class="mb-2 row">
@Html.LabelFor(model => model.FileDescription, new { @class = "col-sm-4 col-form-label fw-bold text-sm-end" })
<div class="col-sm-6">
@(Html.Kendo().TextBoxFor(model => model.FileDescription).HtmlAttributes(new { @class = "w-100" }))
</div>
</div>
Rewritten:
@(Html.Kendo().Template()
.AddHtml("<div class='mb-2 row required'>")
.AddHtml(@<text>
@Html.LabelFor(model => model.FileName, new { @class = "col-sm-4 col-form-label fw-bold text-sm-end" })
</text>)
.AddHtml("<div class='col-sm-6'>")
.AddComponent(c => c.TextBoxFor(model => model.FileName).HtmlAttributes(new { @class = "w-100" }))
.AddHtml("</div></div>")
.AddHtml("<div class='mb-2 row'>")
.AddHtml(@<text>
@Html.LabelFor(model => model.FileDescription, new { @class = "col-sm-4 col-form-label fw-bold text-sm-end" })
</text>)
.AddHtml("<div class='col-sm-6'>")
.AddComponent(c => c.TextBoxFor(model => model.FileDescription).HtmlAttributes(new { @class = "w-100" }))
.AddHtml("</div></div>")
)
While this works, this markup seems much harder to read than the original. Could this be made to be simpler? Ideally I'd like to be able to drop my existing mix of html and kendo components in one method and it'd parse through to render the template properly.
When the Grid is nested in a relatively positioned container, during the export the Grid gets an overflow style to its wrapping element. Then the style is removed and re-added again. This happens in a loop, which results in a vertical scrollbar constantly appearing and hiding.
Flickering caused by a scrollbar appearing and hiding
The Grid should remain unchanged during the export and no scrollbar should appear and hide during the export.
When creating columns in a TagHelper Grid definition, the Width property allows only numbers:
<column field="OrderID" width="100">
</column>
This does not match the width property in the Kendo UI and HtmlHelpers Grid definitions which allow string values to be entered as well:
https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/configuration/columns.width
That way, the developer will be able to add rem and other unit values in TagHelper syntax as well.
Also, it would be convenient if there is a new property similar to this:
<column field="OrderID" tooltip="Unique Number of the Order">
</column>
<column field="Freight"
html-attributes='new Dictionary<string, object>{ ["style"] = "width: 30rem;" }'>
</column>
### Bug report
When subscribing to the "requestStart"/"requestEnd" events of the DataSource after the Grid's initialization, the events do not fire during the Excel export.
### Reproduction of the problem
1. Enable the server operations of the Grid's DataSource.
2. Get a reference to the Grid and handle the DataSource "requestStart"/"requestEnd" events by using the bind() method.
3. Export the Grid's data to Excel through the built-in command.
4. The "requestStart"/"requestEnd" events do not trigger when the read request is activated.
A Dojo sample for reproduction: https://dojo.telerik.com/eyiDIGeM
### Expected/desired behavior
The "requestStart"/"requestEnd" events must trigger when exporting the Grid to Excel.
### Environment
* **Kendo UI version: 2024.3.806
* **jQuery version: 3.7.0
* **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.
### Bug report
When removing a data item through the DataSource remove() method, and then trying to add a new record in the Grid, the editable row does not close when clicking the "Save" command. The Grid is set up for InLine editing.
### Reproduction of the problem
1) Create an InLine editable Grid that binds to local data.
2) Add a custom column command that removes the respective data item by using the remove() method of the DataSource.
3) Delete a specified Grid record through the custom command.
4) Add a new record and click the built-in "Save" command.
5) The row remains in edit mode.
A Dojo sample for reproduction: https://dojo.telerik.com/IQIDuGOt
The last working version is 2024.1.130
### Expected/desired behavior
The editable row must close when clicking "Save" or "Cancel".
### Workaround
Use the Grid removeRow() method rather than the DataSource remove() method.
### Environment
* **Kendo UI version: 2024.1.319
* **jQuery version: 3.7.0
* **Browser: [all]
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
Grid row drag and drop capabilities enhancement request.
Currently, in order to drop a row from one Grid into another empty Grid, adding a placeholder row to the empty Grid with custom logic is required: https://demos.telerik.com/kendo-ui/grid/drag-drop
It would be nice to have a more robust drag and drop functionality that doesn't rely on custom logic to such an extent.
Please ensure that FilterableMessageBuilder configurations are applied to the Filter's menu when it is placed within a ColumnMenu or expose configurations to control the messages of the Filter menu within the GridColumnMenuMessagesBuilder.
Here is an example REPL that showcases the configuration doesn't have effect
.Filterable(f => f.Messages(m =>
{
m.And("Custom And");
m.Or("Custom Or");
}))
unless ColumnMenu() is commented out.
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:
Is it possible to add an "attributes" option to the editable.window configuration that allows the addition of HTML attributes to the window?
For example:
//HtmlHelper Grid
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
...
.Editable(editable => editable.Mode(GridEditMode.PopUp).Window(wnd => wnd.HtmlAttributes(new { @class= "my-custom-window" })))
)
//Kendo UI for jQuery Grid
$("#grid").kendoGrid({
...
editable: {
mode: "popup",
window: {
attributes: {
"class": "my-custom-window"
}
}
}
});