When the Columns.Command.Edit.UpdateText property is set to Update
, the text will not be modified and will remain as the default value Save
.
@(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.ProductViewModel>()
.Name("grid")
.Columns(columns =>
{
columns.Command(command => {
command.Edit().UpdateText("Update"); //Will not work
}).Width(250);
})
//....
)
REPL
https://netcorerepl.telerik.com/wIuyvtcO41rAa82G36
The text should change to the specified content within UpdateText.
Set the text via JavaScript using the setOptions method and columns.command.text:
$(document).ready(function(){
var grid = $("#grid").data("kendoGrid");
var options = grid.getOptions();
//set the text for the first command in the last column
// as shown in the second example on:
//https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/configuration/columns.command#columnscommandtext
options.columns[4].command[0].text = { edit: "Edit", update: "Update" };
grid.setOptions(options);
});
REPL
https://netcorerepl.telerik.com/wIYeGmOz39LL8mHN26
### Bug report
When the deferred scripts are created, the script source points at the root of the application instead of the application's root directory.
### Reproduction of the problem
Enable the global deferred initialization and call the @(Html.Kendo().DeferredScriptFile()) method.
The rendered script tag is: <script src="/kendo-deferred-scripts-XXXX.js"></script>
But it must be: <script src="/MyWebsite/kendo-deferred-scripts-XXXX.js"></script>
### Solution:
If you add a tilde in the Url.Content(), the generated script file must be located as expected:
public HtmlString DeferredScriptFile(string nonce = "")
{
...
var scriptResult= hasDeferredScritps ? $@"<script src=""{urlHelper.Content("~/kendo-deferred-scripts-" + guid + ".js")}"" {(string.IsNullOrEmpty(nonce) ? "" : "nonce=" + '"' + nonce + '"')}></script>" : "";
var styleResult = hasDeferredStyles ? $@"<link href=""{urlHelper.Content("~/kendo-deferred-styles-" + guid + ".css")}"" {(string.IsNullOrEmpty(nonce) ? "" : "nonce=" + '"' + nonce + '"')} rel=""stylesheet""></link>" : "";
return new HtmlString(scriptResult + System.Environment.NewLine + styleResult);
}
### Environment
* **Telerik UI for ASP.NET Core version: 2023.3.1114
* **Browser:** [all]
When both UI for ASP.NET MVC and UI for ASP.NET Core Visual Studio extensions are installed and only UI for ASP.NET Core project is loaded, the notification for new version is shown for UI for ASP.NET MVC.
Test Environment:
OS Version: 22H2 OS Build 22621.1702
Edge Version: Edge(Chromium) Version 114.0.1823.37 (Official build) (64-bit)
Pre requisites:
High contrast mode: Settings->Accessibility->contrast themes-> select Aquatic/desert theme
Repro-Steps:
Users with low vision and who rely on high contrast aquatic and desert theme will face difficulties if the selected date is not visible clearly.
In the ThemeBuilder the controls do not use the latest version.
For instance while playing around with the ThemeBuilder I noticed that the primary button does not look primary like on the demos page.
Also it would be helpful to provide a page where you explain where every color is used.
If you use "Edit in REPL" button in any demo that uses `kendoConsole.log()`, it will throw an error that the kendoConsole doesn't exist (you can use the Upload > Events demo as a quick example).
This is happening because the kendoConsole is only a part of demos.telerik.com pages that does not get copied over to the REPL or Dojo because it is irrelevant to the demo itself. The fix is to change all kendoConsole.log() instances to console.log()
That said, I am opening this bug report so that the dev team can consider ways to handle the "edit in" scenarios.
Thank you,
Arthur
Issue
Using any overload of ToDataSourceResult(Async) with a DataSourceRequest containing filter descriptors on an IQueryable provided by Entity Framework core 2.x, causes Entity Framework's "Query cache" to fill up for different filter values, leaking memory in the process. This is caused by using Expression.Constant in the generated expression trees for a DataSourceRequest's FilterDescriptors. Refer to https://github.com/dotnet/efcore/issues/14859 for more details about why this leaks memory.
Since Entity Framework's cache is always missed for new filter values, performance is also degraded due to this issue.
The issue is not present when using Entity Framework core 3 or greater. Apparently using Expression.Constant is not an issue on these version.
I have attached a minimal working example that illustrates the memory leak.
Fix
This issue can be fixed by changing FilterDescriptorExpressionBuilder.CreateValueExpression to not return a ConstantExpression, but a MemberExpression instead. Entity Framework 2.x will correctly parameterize the MemberExpression, causing the query cache to be hit correctly for queries that only differ in parameter values. It won't parameterize ConstantExpressions. Refer to https://stackoverflow.com/a/60516780/147993 for an example of generating a MemberExpression instead of a ConstantExpression.
When certain options of the editable Window are set through configuration, they are not being serialized correctly:
MinWidth
MinHeight
Events (Open, Close, etc.)
@page
@model IndexModel
@{
ViewData["Title"] = "Home page";
}
<
form
class
=
"form-horizontal"
method
=
"post"
>
<
h4
>Standard textbox:</
h4
>
@Html.TextBoxFor(m => m.Candidate.CandidateId)
<
h4
>Kendo textbox:</
h4
>
@Html.Kendo().TextBoxFor(model => model.Candidate.FirstName)
<
div
class
=
"form-group"
>
<
div
>
<
button
type
=
"submit"
class
=
"btn btn-default"
>Submit</
button
>
</
div
>
</
div
>
</
form
>
public
class
IndexModel : PageModel
{
[BindProperty]
public
CandidateViewModel Candidate {
get
;
set
; }
public
void
OnGet()
{
}
public
void
OnPost()
{
ViewData[
"firstname"
] = $
"{Candidate.FirstName}"
;
ViewData[
"candidateid"
] = $
"{Candidate.CandidateId}"
;
}
}
public
class
CandidateViewModel
{
[Key]
[Display(Name =
"Candidate ID"
)]
public
int
CandidateId {
get
;
set
; }
[Required]
[Display(Name =
"First Name"
)]
public
string
FirstName {
get
;
set
; }
}