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]
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.
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.
In the Kendo UI for jQuery Grid, fields that are not editable are displayed as text (no input elements) in the Grid's popup editor. The MVC Grid displays all fields that are present in the view model it is bound to in its popup editor.
Implement an option to configure the editable fields, so that the behavior of the MVC Grid matches that of its Kendo UI counterpart.
A recent update has revealed some strange behaviour in some (not all) grids. In the attached screenshot, the javascript for the two buttons is on display inside the toolbar. If I move them out of the toolbar, the script no longer displays.
As a workaround, I have added this to CSS:
script {
display: none !important;
}
In the Less themes the textboxes and the other editors (e.g., NumericTextBox) in the popup of the Grid are misaligned. The rendering of the textboxes in the MVC and Core Grid is different when compared to the Kendo UI for jQuery Grid.
Reproducible in the Popup Editing demos (Core and MVC).
The width of the TextBox does not match the width of the NumericTextBox.
The rendering differs:
<span class="k-widget k-textbox k-valid" style=""><input data-val="true" data-val-required="The Product name field is required." id="ProductName" name="ProductName" value="" data-role="textbox" aria-disabled="false" class="k-input k-valid" autocomplete="off" data-bind="value:ProductName" style="width: 100%;"></span>
vs
<input type="text" id="ProductName" name="ProductName" title="Product Name" required="required" autocomplete="off" data-bind="value:ProductName" class="k-textbox k-valid">
Identical rendering and alignment.
Reported in: Ticket ID: 1524543. Reproducible in Chrome and Firefox. Not reproducible in Edge
Version 91.0.864.54.
Dojo example: https://dojo.telerik.com/iqUFarUV/3
On dragging the handle the column width automatically increases. Then if you try to decrease the width, you can't go past a certain width threshold.
The columns can be resized precisely, similarly to when their width is set in "px" instead of "%".
As the title says, I'm getting script errors when attempting to perform a delete function with an MVC grid when in MobileMode.Phone. The attached project will illustrate the problem. Just run it and select delete button for one of the items in the far right column. A popup will appear, but don't click either of the buttons on it yet. Inspect the html with whatever browser you use (I'm using chrome so I just right click and choose select). There will be a "Cannot read property 'data' of undefined" error. If you then click the "Delete" button, you'll get a "Cannot read property 'resolve' of undefined". Then click on the "Cancel" button and you'll get "Cannot read property 'reject' of undefined". I'll attach a pic showing these errors.
I need to be able to utilize my grid in mobile phone mode and delete items. Please help with this.
Also, to get this sample project small enough, I removed the files from the MobileSaveError\lib\KENDOUIMVC\2020.3.915.545 folder. I figure you can replace those easily enough. Is that the right thing to do in this case? I thought maybe I could remove the items in the Packages folder as NuGet/VS will usually restore those. But wasn't 100% sure on that. So if you can tell me or link me to an article about what we can remove to shrink the project size for samples when we need to send them, that would be great.
Thank you,
Steven
Currently the ForeignKey column expects data to be loaded in it initially. This could be either local data or remote data.
For scenarios that involve using large data, it would be helpful if we can have more flexibility with the way data is loaded in the column's editor (e.g., DropDownList). For example, we want to use cascading ForeignKey editors. Once a selection is made in the first dropdown, the second cascades and is loaded with the respective data. This is not viable at the moment, because the data must be supplied to the ForeignKey column initially. If an empty collection is passed initially:
columns.ForeignKey(c => c.Field1, new List<SelectListItem>(), "Value", "Text").Width(100);
and the dropdown is then loaded with data after the Grid's Edit popup opens, the ForeignKey column will display the DataFieldValue as text, because no initial data has been provided.
An option to load data on demand would be a welcome performance enhancement.
When using template and no DataSource is set Grid NoRecords message is not rendered.
Define a 'No Records' with template similar to the following article example: https://docs.telerik.com/aspnet-mvc/html-helpers/data-management/grid/templates/no-records
@(Html.Kendo().Grid<Grid_Template.Controllers.GridModel>()
.Name("Grid1")
.NoRecords(n => n.Template("string HTML template, not centered"))
)
The default message for missing record is displayed: No records available.
"autoBind":false is applied to serialization
The message from the template is displayed: "string HTML template, not centered"
Workaround:
Add .DataSource(d => d.Ajax()) to the Grid configuration
@(Html.Kendo().Grid<Grid_Template.Controllers.GridModel>()
.Name("Grid1")
.NoRecords(n => n.Template("string HTML template, not centered"))
.DataSource(d => d.Ajax())
)
https://github.com/telerik/kendo-ui-core/issues/6598
It would be nice, if you can create a build-in property or function to create icon-only buttons/commands in a grid.
Actually it requires some workaround to realize this.
This Example create an edit button with the k-button-icontext class, but i want only an k-button-icon button. The destroy button gets the button name as default text.
@(Html.Kendo().Grid<WidgetDashboard.Models.Widget.WidgetData>()
.Name("adminWidgetGrid")
.Columns(columns =>
{
columns.Bound(p => p.Name).Width(150);
columns.Bound(p => p.Active).Width(75);
columns.Command(command => { command.Edit().Text(" "); command.Destroy().Text(""); }).Width(300);
})
//.ToolBar(toolbar => toolbar.Create())
.Editable(editable => editable.Mode(GridEditMode.InLine))
.Pageable(p => p.Refresh(true))
.Sortable()
.Scrollable()
.Resizable(r => r.Columns(true))
.HtmlAttributes(new { style = "height:450px; width: 100%" })
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
//.Events(events => events.Error("error_handler"))
.Model(model => model.Id(p => p.ID))
.Create(update => update.Action("Admin_Create", "Dashboard", new { id = Model.DashboardId }))
.Read(read => read.Action("Admin_Read", "Dashboard", new { id = Model.DashboardId }))
.Update(update => update.Action("Admin_Update", "Dashboard", new { id = Model.DashboardId }))
.Destroy(update => update.Action("Admin_Destroy", "Dashboard", new { id = Model.DashboardId }))
)
)
Alternative it would be ok if the correct css class is given when an empty string is specified.
Thank you
Christian
I would like to be able to create .bindBoolColumn. I do not want extend the column itself. I already have extensions for that.
Something like this:
GridBoundColumnBuilder<TModel> BoundBoolean<TValue>(Expression<Func<TModel, TValue>> expression)
public GridBoundColumnBuilder<TModel> BoundBool<TValue>(Expression<Func<TModel, TValue>> expression)
{
column = *place create column code here*;
column.Width(90);
column.clientTemplate("customtemplate");
}