I have multiple MultiSelect Instances:
@foreach (var group in Model.WellnessGroups)
{
<
div
class
=
"hpanel hblue"
>
<
div
class
=
"panel-heading hbuilt"
>
@group.Name
</
div
>
<
div
data-groupId
=
"@group.Id"
class
=
"panel-body"
style
=
"display: block;"
>
<
select
multiple
data-groupId
=
"@group.Id"
class
=
"groupMultiSelect"
></
select
>
</
div
>
</
div
>
}
Each MultiSelect instance is wrapped in a groupId.
I would like for each MultiSelect instance to reflect in it's placeholder/value the specific items that have been saved to the database under that id.
I have an ajax call to a controller that will save the selected values on each "select" event so that when I select an employee, the ajax call grabs the employeeId and groupId and saves it into the database:
$(
".groupMultiSelect"
).kendoMultiSelect({
placeholder:
"Select Employees"
,
dataTextField:
"displayName"
,
dataValueField:
"objectId"
,
dataSource: dataSource,
autoBind:
true
,
select:
function
(e) {
var
employeeId = e.dataItem.objectId;
var
wellnessGroupId = $(
this
).closest(
"div"
).prevObject[0].element[0].getAttribute(
'data-groupId'
);
wellnessGroupId = parseInt(wellnessGroupId);
$.ajax({
url:
"@Url.Action("
SaveEmployeeToGroup
")"
,
cache:
false
,
data: {
employeeId: employeeId,
wellnessGroupId: wellnessGroupId
},
type:
"Post"
,
}).done(
function
(res) {
toastr.success(
"Employee Saved to Wellness Group"
);
}).fail(
function
(err) {
toastr.error(
"There was a problem saving this entry.
);
});
},
value: {
//TODO: bind values of each multiselect field to reflect data that has been saved.
}
});
});
I'm using the Kendo Editor for Angular JS.
I want to set the default Formatting tool value to be Paragraph when the editor is loaded.
Is there a way to do that?
Other than that, in the thread https://www.telerik.com/forums/clean-the-paragraph-format it says that "The Paragraph format option is the default structural markup option", but when only a single-line text is entered with no formatting, the <p> tags are not added to it.
for example in http://dojo.telerik.com/aCUke , if the character 'a' is written in the editor and the focus is removed, the value is saved as only 'a' and not '<p>a</p>'.
Is this the editor's behavior by design? Or is it a bug?
Thanks,
Arik
<
div
data-role
=
"grid"
id
=
"id"
data-groupable="true"
data-group="function(e) {
if (e.groups.length > 1) {
console.log('ciao');
e.groups[0] = e.groups.pop();
}}"
data-columns="[
{ 'field': 'name', 'width': 270 },
{ 'field': 'age' },
]
</
div
>
Error:
how do I fix it?
HI
I have a question about widget object comparison :
There have FirstButton and SecondButton in the view those share the same event handler (FirstButton_Click),
How can I tell the e.sender is equals to which ?
Is the code correct or not ? if not how to do ?
View
@(Html.Kendo().Button()
.Name("FirstButton")
.Content("First")
.Events(events => events.Click("class1.FirstButton_Click"))
.HtmlAttributes(new { @type = "button" }))
@(Html.Kendo().Button()
.Name("SecondButton")
.Content("Second")
.Events(events => events.Click("class1.FirstButton_Click"))
.HtmlAttributes(new { @type = "button" }))
Javascript
FirstButton_Click: function(e)
{
// Click
var FirstButton = $("#FirstButton").data("kendoButton"), SecondButton = $("#SecondButton").data("kendoButton");
var FirstButton2 = $("#FirstButton").data("kendoButton");
//
if (e.sender == FirstButton)
alert("The sender is FirstButton");
if (e.sender == SecondButton)
alert("The sender is SecondButton");
Best regards
Chris
I'm trying to load a large dataset (~2000 rows) on kendo ui grid - jquery. But it's creating a performance bottleneck and very jerky screen on Google chrome (performance profiling says: Forced reflow is a likely performance bottleneck). But same code/ui runs flowlessly on firefox. I've added a sample dojo.
dojo: http://dojo.telerik.com/eleNEQ/3
In this dojo please hover on the animated button after dataload.
Test criteria:
Google chrome: Version 61.0.3163.100 (Official Build) (64-bit)
Firefox: 56.0 (32-bit)
I'm wondering whether this issue can be solved by telerik. Thanks in advance.
I am using the Grid with a Filter row and I am trying to specify the column input width, but it does not work when using the Boostrap v4 theme.
Please see the following dojos where I added an inputWidth to the OrderID column.
Boostrap v3 theme (works): http://dojo.telerik.com/AmABaV
Boostrap v4 theme (does not work): http://dojo.telerik.com/AsiGi
The way our setup works updating one event might cause other events to "shift" so the server sends back all Scheduler Events that were modified. I tried just returning all of those as JSON but the scheduler doesn't seem to pick up on them.
Is there a way to sync whatever the server returned with the datasource for the scheduler? or do I just need to issue a read()
Looking at
_accept: function(result) inside kendo.data.js
I can see that it just uses the original batch of models and the index order to do updates so it can't really handle more items coming back then were sent