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.
The custom ordering of the filter values in the Telerik UI ASP.NET Core Grid does not function correctly when using TagHelpers.
A REPL sample for reproduction: https://netcorerepl.telerik.com/wIYNvEvn00CAqNGL14
The filter values should be presented in the same order as specified in the Filterable configuration.
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>
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.
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.
### 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.
Reproducible with the Grid's tag helper. Works as expected in the Html helper.
The toolbar does not show the RadioGroup.
A RadioGroup should appear in the toolbar, as set in the toolbar command template:
<toolbar-command-template>
<kendo-radiogroup name="test">
<kendo-radiogroup-items>
<kendo-radiogroup-item label="Factor" value="F"></kendo-radiogroup-item>
<kendo-radiogroup-item label="Equation" value="E"></kendo-radiogroup-item>
</kendo-radiogroup-items>
</kendo-radiogroup>
</toolbar-command-template>
Setting the Reoderable.Rows.ClickMoveClick() API configuration explicitly to false
results in an error when using the HTML Helper wrappers.
Setting the Reoderable.Rows.ClickMoveClick() explicitly to false
throws the following error:
Setting the Reoderable.Rows.ClickMoveClick() explicitly to false
should not throw an error.
### Bug report
The "confirmation" attribute of the editable tag does not accept a string.
### Reproduction of the problem
Add a confirmation text as a string in the "confirmation" attribute, as per the example below:
<kendo-grid name="grid">
...
<editable mode="popup" confirmation="Are you sure you want to hide this invoice?" />
</kendo-grid>
A REPL sample for reproduction: https://netcorerepl.telerik.com/moEqPSFo32PrwW4d01
### Expected/desired behavior
The "confirmation" option must accept a string.
### Environment
* **Telerik UI for ASP.NET Core version: 2024.2.514
* **Browser: [all]
I'm using the grid with a Status Bar Template and a button component in the template.
When trying to reference the button using the data() method it returns "undefined".
I've made small changed to the Grid's "selection Aggregates" demo to show the problem:
In the sample code, when selecting a cell in the top grid, the "T" button should be enabled but the line
returns undefined.
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
### 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]
### Bug report
When adding a new record in an InCell editable Grid with enabled "autoSync" option, it is not rendered in the Grid.
### Reproduction of the problem
A Dojo sample for reproduction: https://dojo.telerik.com/@gdenchev/omotILiP
### Expected/desired behavior
The new record must be visible at the top of the Grid table when the Create operation completes.
The last working version is 2024.1.130.
### Environment
* **Kendo UI version: 2024.1.319
* **jQuery version: 3.7.0
* **Browser: [all]
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.