I have a project that uses Kendo UI version 2019 R3 SP 1.
I got some issues when I do the sorting on the content that contains rich text editor (RTE).
I made some demo in the dojo (https://dojo.telerik.com/@septovan_nalysa/IsEgIxAQ)
You can open the demo try to move one of 2 contents.
The issues are the RTE that you moved:
1. becomes like a read-only/disabled field;
2. has empty value.
I tried to change the Kendo UI version 2021 R1 SP2 but I'm still facing the same issues.
Does anyone can help me?
Thanks.
I am having some issues with the MVC Wrappers for Kendo UI. It seems that IEnumerable does not support any aggregate values other than count. The exception that I get is: No generic method 'Sum' on type 'System.Linq.Enumerable' is compatible with the supplied type arguments and arguments. No type arguments should be provided if the method is non-generic. I am using System.LInq.Dynamic but this issue occurs without using a Dynamic query.
I am not sure how to get around this issues nor am I sure if it is a flaw with Kendo.
Controller
public
ActionResult Index() {
return
View(); }
public
ActionResult Read([DataSourceRequest] DataSourceRequest request) {
return
GetView(request); }
private
IEnumerable<dynamic> GetData() { var db =
new
NwEntities();
return
db.Products.Select("new(ProductID,ProductName,UnitPrice)"); }
private
JsonResult GetView(DataSourceRequest request) {
return
Json(GetData().ToDataSourceResult(request)); }
View
@model IEnumerable<
dynamic
>
@(
Html.Kendo().Grid(Model).Name("Grid")
.DataSource(ds =>
ds.Ajax()
.Model(m =>
{
m.Id("ProductID");
m.Field("ProductName", typeof(string));
m.Field("UnitPrice", typeof(decimal));
})
.Aggregates(aggregate => aggregate.Add(a => "UnitPrice").Count().Sum())
.Read(r => r.Action("Read", "Home"))
)
.Columns(columns =>
{
columns.Bound("ProductID");
columns.Bound("ProductName");
columns.Bound("UnitPrice").Format("{0:c}");
})
.Groupable()
)
I have spent a week trying to get this to work with no luck and this is a critical issue.
Hi there. Here's my setup;
I have a grid and in the grid I bind to a column. The column has a template applied to it.
View
.Columns(current =>
{
current.Bound(p => p.CurrentMaterial).EditorTemplateName("ddl_Mixing_Materials_Current");
current.Group(g1 => g1.Title("Volumes")
.Columns(volume =>
{
volume.Bound(p => p.CurrentVol). EditorTemplateName("kIntegerNoSpinnerNoNegativesNamed"); <---//This one!
volume.Command(p => p.Custom("-20").Click("Remove20"));
})
);
Template
@model int?
@(Html.Kendo().NumericTextBoxFor(m => m)
.Name("NumericTextBox") <-- I know this will confuse the bounding - I changed just to make next step clearer
.HtmlAttributes(new { style = "width:100%" })
.Decimals(0)
.Placeholder("")
.Min(0)
.Max(500) <-- this is what I need to set after data binding!
.Spinners(false)
)
So the issue is, I need to set the max of each column depending on the object bound to it. Each object has a 'maxVolume' that I want to use to set the 'max' value in the template. However - I looked at the API page and I tried to access the numberTextBox like it suggests, but the textbox is always 'undefined'. Here's the script and how I'm trying to access the NumericTextBox
Script
function dataBound(e) {
var grid = this;
grid.tbody.find("tr[role='row']").each(function () {
var model = grid.dataItem(this);
var maxValue = model.MaxVolume;
alert(maxValue); <-- All good
var test2 = $(this).find("#NumericTextBox");
alert(test2); <-- Object found
var numericTextBox2 = $('#CurrentVol').data('numerictextbox');
alert(numericTextBox2); <-- 'Undefined'
var numericTextBox3 = $(this).find("#NumericTextBox").data('kendoNumericTextBox');
alert(numericTextBox3); < -- Still 'undefined'
});
}
So I'm clearly missing something. Is there some extra bit of traversal I need to do in my script because of the looping through grid rows I do? Am I looking for the wrong .data() type?
Any help would be great. thanks.
Hi Team,
I am using the Kendo DateTimePicker and validator to validate the dates. Please find the below code. The issue I am having is that I see the "error message" for all the fields even thought rules returns true for those field. For example, I see the error message for the fields that have return value "false" which is fine. However, after running the validator, once I click on each field, I see the error message for that field. Even though these field have return value "true" from the function I have attached. I do not understand why I see the error message for all the fields.
1) What I want is I have two conditions in the function (if, else if). If these conditions get true, I want to display the error message. Otherwise, no error message needs to display because those dates are valid.
2) Is there a way to clear/reset the error message if there is any for a specific date field.
I really appreciate your help team. Please get back to me as soon as you can, I am waiting for your relpy.
function executeMaxMinValidationOnEachDate(datesArray) {
//$("#validateEditableFields").kendoValidator({
var minDate = 0;
var maxDate = 2;
var validator = $("#validateEditableFields").kendoValidator({
rules: {
datepicker: function (input) {
var currDate = kendo.parseDate(input.val()).getTime();
if (maxDate === 10) {
if (input.is("[data-role=datetimepicker]") && currDate < datesArray[minDate]) {
return false;
}
}
else if (input.is("[data-role=datetimepicker]") &&
(currDate < datesArray[minDate] || currDate > datesArray[maxDate])) {
minDate++;
currentDate++;
maxDate++;
return false;
//return input.data("kendoDateTimePicker").value();
} else {
minDate++;
currentDate++;
maxDate++;
return true;
}
}
},
messages: {
datepicker: "Please enter valid date!$$$$"
}
}).data("kendoValidator");
validator.validate();
}
The Boostrap grid system gives wrong result in a Window.
The grid seems to have only 9 columns.
My View :
@(Html.Kendo().Window()
.Name("window")
.Title("My window")
.Width(400)
.Content(@<
text
>
<
div
class
=
"row"
>
<
div
class
=
"col-md-3"
>
First col
</
div
>
<
div
class
=
"col-md-3"
>
Second col
</
div
>
<
div
class
=
"col-md-3"
>
Third col
</
div
>
<
div
class
=
"col-md-3"
>
Fourth col
</
div
>
</
div
>
</
text
>)
)
The result is shown in the png file.
Any suggestions will be very appreciated.
@(Html.Kendo().TreeView()
.Name("treeviewDetails")
.Items(treeview =>
{
treeview.Add().Text("Information")
.Expanded(true)
.Items(root =>
{
root.Add().Text("Priority" + ": " + InOnwHours);
root.Add().Text("Due Date" + ": " + "Today");
root.Add().Text("Return emails" + ": " + "example@gmail.com");
});
}
How i can format the part of text in root.Add().Text text ? i need show the text after ":" in different color, style and size. (for example example@gmail.com in red) see attached image.
Thank you for help.
Is there a way to have only icons in the commands of the tree list like there is for Grid?
I manage to do this for Edit, Delete and CreateChild. But I can not do this for Update and Cancel buttons
Hi Team,
I am using the Telerik DateTimePicker ASP.NET MVC, and I noticed that after clicking onto the calendar, once I navigate to "Time" tab of the calendar, "Hour" and "Minutes" are not aligned properly. The higher "Minute" I select does not align in the center. For example, if I select "minute" 10, then it would stay in the center of the minute column. However, if I select 58 minute, then it would not be in center of the minute column.
Please find the attached screenshot to review the issue I am having, and please get back to me as soon as you can.
I am looking forward to hearing back from you.
Best,
Mayur Maisuria