I downloaded the latest version of Kendo UI (Version: 2020.1.406) for MVC and upgraded my project to refer the latest JS, CSS and Kendo.MVC (2020.1.406.545).
NoRecords method is behaving differently in the latest version. While fetching records in progress, it displays the 'No record found' message even before completion of the action method. Please see the below image:
It was not happening in the version 2018.2.516, it was showing the 'No record found' message after completion of the action method and only if there is 0 row returned.
Below is the code of Student.cshtml view:
<h4>Student</h4>Not sure if this is already in the works but when building mvc grids it would be helpful to have the ability to prevent a column from getting too big when the screen size is larger than the grid needs. Right now if columns are turned off and there is more space for the unlocked columns, they expand to fill the page which is normally fine but in some instances it looks silly to have a column for example that you would enter a 2 digit number in to be 300 plus px wide.
https://demos.telerik.com/aspnet-mvc/grid/foreignkeycolumn
In addition to the Foreign Key editor template, populate a list which holds all the categories and pass it via the ViewData - you can see how this is done in the ForeignKeyColumnController.cs PopulateCategories()
method.
On the above page, the above statement is made. Other than the function call to PopulateCategories() I don't ever see the actual code run in the function shown anywhere. Can someone please add that code and/or point me to my misunderstanding?
Thank you.
Court Harris
Equity Residential
columns.Command(command => command.Custom("View Email"))
.Title("Body")
.Width(150);
When the Grid is configured to use server binding, it will render an anchor element. If remote binding is used, the Grid will correctly render a button element.
Consistency in the rendering. A button element should be rendered, regardless of using server or remote binding.
Exemplary configuration:
@(Html.Kendo().Grid<MyApp.Models.SampleTable>()
.Name("grid")
.ColumnMenu()
.Scrollable(s => s.Enabled(true).Height("auto"))
.DataSource(dataSource => dataSource
.Ajax()
.Model(model => model.Id(p => p.PrimaryKey))
.Read(read => read.Action("Read", "Home"))
.Sort(sort => sort.Add("ColumnDate").Descending())
)
.Resizable(resize => resize.Columns(true))
.Columns(columns =>
{
columns.Select().Width(60);
columns.Group(group => group
.HeaderTemplate(@<text><a class='k-link myHeaderTemplate' href=''>@ViewBag.MyHeaderTitle</a></text>)
.Columns(c =>
{
c.Bound(x => x.Field1).Width("10%");
c.Bound(x => x.Field2).Width("15%");
})
);
columns.Bound(c => c.Field3)
.Filterable(ftb => ftb.Operators(op => op.ForString(str => str.Clear().Contains("Contains"))));
columns.Bound(c => c.Field4);
columns.Bound(c => c.Field5).Hidden(true).Format("{0:dd-MM-yyyy hh:mm:ss tt}").Filterable(f => f.UI("dateFilter").Cell(cell=>cell.ShowOperators(false)));
columns.Bound(c => c.Field5).HtmlAttributes(new {style="text-align:right" })
.Filterable(f=> f.Cell(c=>c.Template("intFilter")))
.HeaderHtmlAttributes(new { style="text-align:right" });
columns.Bound(c => c.Field6).Filterable( f=>f.Cell(cell=>cell.ShowOperators(false).Operator("contains")));
columns.Bound(c => c.Field7);
columns.Bound(c => c.Field8);
})
.Filterable(ftb => ftb.Mode(GridFilterMode.Row))
.PersistSelection()
.Pageable(pager => pager
.PageSizes(new int[] { 10, 20, 30 })
)
.Sortable()
.Filterable()
.Editable(e => e.Mode(GridEditMode.PopUp).DisplayDeleteConfirmation(false))
.Excel(excel => excel
.FileName("Export.xlsx")
.Filterable(true)
.ProxyURL(Url.Action("Excel_Export_Save", "Grid"))
)
)
For a sample project, contact Ivan Danchev or Georgi Yankov.
If one of the columns (e.g. Field6) has a long header title calling the autoFitColumn and passing the column to it does not properly resize the column. The column remains narrow and its header text remains cut off.
Similarly, the method does not have the expected effect on columns with shorter text in the header, i.e. they remain wide instead of shrinking to the text length.
Incorrect column resizing.
Correct column resizing.
Dojo example: https://dojo.telerik.com/InUYAheR/4
Drag and drop a row from Grid2 to Grid1 by following the steps below:
Grid1's first row values get updated, instead of the drop target row values. This is because e.target in the DropTarget's "drop" event does not return the actual target you drop over.
If you click and drag in the middle of the Grid2 row, drag it and drop it over a row in Grid1, the drag and drop functionality works as expected: e.target returns the correct target.
e.target should consistently return the target you drop over, regardless of where in the dragged row you have clicked.
When the grid is bound to an external dataSource, the AutoBind(false) setting is not serialized and as a result, the grid binds immediately
@(Html.Kendo().DataSource<Kendo.Mvc.Examples.Models.CustomerViewModel>()
.Name("myDs")
.Ajax(r=>r.Read(a=>a.Action("Customers_Read", "Grid")))
)
@(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.CustomerViewModel>()
.Name("grid")
.AutoBind(false)
.DataSource("myDs")
/* other settings */
)
The grid should not bind initially.
Kendo UI version: 2020.2.617
### Bug report
When the GroupPaging option is enabled and the grid is bound to a DataTable, the server error "Value cannot be null" is observed.
### Environment
* **Kendo UI version:** 2020.3.915
* **jQuery version:** 1.12.4
* **Browser:** [all]
Enhancement
FIltering a string field in the Grid with Contains operators and value null throws an error
Reported in 1492459
Current behavior
FIltering a string field in the Grid with Contains operators and value null throws an error
https://demos.telerik.com/aspnet-mvc/grid/remote-data-binding
Expected/desired behavior
An error shall not be thrown
Environment
Kendo UI version: [all]
Browser: [all]
Enhancement
JAWS includes hidden columns upon reading the column numbers.
Expected/desired behavior
Hidden columns shall not be included when JAWS reads the column number.
Hidden columns lack aria-hidden="true" property.
Environment
Kendo UI version: a[all]
Browser: [all]
Bug report
When there are 3 levels of filter nesting in the URL clearing of a filter does not apply
Reproduction of the problem
1. Go to https://demos.telerik.com/aspnet-mvc/grid/serverbinding
2. On “Product Name” column apply filter “Contains” with value “a”
3. On “Unit Price” column apply filter “Is greater than” with value “1”
4. On “Units In Stock” column apply filter “Is greater than” with value “1”
5. On “Product ID” column apply filter “Is greater than” with value “1”
6. Clear the filter on “Product Name” column
Expected result: no more filter on “Product Name” column
Actual result: “Product Name” column still has a filter
A workaround is provided in the following Dojo:
https://dojo.telerik.com/UJewihaX
Environment
Kendo UI version: all
Browser: all
Bug report
Error is thrown when using Kendo HTML Editor Control in Kendo Grid Popup EditorTemplate in IE only
Reproduction of the problem
Place Kendo editor in Grid popup template
@(Html.Kendo().Grid<TelerikMvcApp2.Models.Person>().Name("persons")
.DataSource(dataSource => dataSource
.Ajax()
.Model(model => model.Id(m => m.PersonID))
.Read(read => read.Action("GetPersons", "Home"))
.Update(up => up.Action("UpdatePerson", "Home"))
)
.Columns(columns =>
{
columns.Bound(c => c.PersonID).Width(200);
columns.Bound(c => c.Name);
columns.Bound(c => c.BirthDate).Format("{0:g}");
columns.Command(cmd => cmd.Edit());
})
.Pageable()
.Sortable()
.Editable(ed => ed.Mode(GridEditMode.PopUp).TemplateName("Person"))
)
Person.cshtml
@(Html.Kendo().EditorFor(model => model.Text))
1. Run and open in IE
2. Click edit, make a change in the popup and Save
2. Click again on Edit
https://www.screencast.com/t/kZFZ9hZNEp
Expected/desired behavior
No error is thrown
Environment
Kendo UI version: 2020.3.118
When using the Grid Endless Scrolling, is there a way to prevent the existing records from momentarily disappearing as the spinner appears?
Using endless scrolling on a large grid (full screen), the users eye tracks down the list as the mousewheel is turned. At the moment the next page is fetched, the view of the data is disrupted as the spinner appears and the data disappears. This can be quite jarring to the senses when browsing for a specific record in the list.
On a small grid such as that on the example page (https://demos.telerik.com/kendo-ui/grid/endless-scrolling-remote) it isn't quite as jarring on the senses, but with a large grid with many columns and rows, it can be very off-putting.
Ideally, if the existing records can remain opaquely visible in the background under the spinner whilst the next page of data is being retrieved, it would produce a much cleaner user experience.
Describe the bug
Column headers do not resize properly in IE11 when scrollable is set to false. Regression introduced in 2021.3.914.
To reproduce
Steps to reproduce the behavior:
The column headers are squished to the left side.
Expected behavior
Columns headers must have the same width as the respective columns.
Workaround:
.k-ie .k-grid-header {
display: table-header-group;
}
Affected package (please remove the unneeded items)
Affected suites (please remove the unneeded items)
Affected browsers (please remove the unneeded items)
Build system information (please remove the unneeded items)
there seems to be a bug in your commands column and it's made worse when loading/saving grid layouts.
When i load a page with this grid column definition,
.Groupable() .Columns(columns => { columns.Command(cmd => cmd.Custom("Undelete") .Click("undelete")) .Width(60);
when you inspect the grid, the grid internally shows two classes for the command cell:
attributes: {class: 'k-command-cell k-command-cell'}
now, if i apply a grid layout, the problem gets worse. This sample code will cause the dom to end up with multiple k-command-cell classes on the grid's td element.
$("#UndeleteGrid").data("kendoGrid").setOptions($("#UndeleteGrid").data("kendoGrid").getOptions())
<td class="k-command-cell k-command-cell k-command-cell k-command-cell k-command-cell k-command-cell k-command-cell k-command-cell k-command-cell" role="gridcell"><a role="button" class="k-button k-grid-Undelete" href="#" title="Undelete"><span class="k-icon k-i-undo"></span></a></td>
We set up a grid that auto-filters a name field to "does not contain" and the value it excludes is "[DEACTIVATED]". This column is also filtering out records that have a null in them if this filter is set. I had to change the datasource to return an empty string instead.