Telerik Forums
Kendo UI for jQuery Forum
1 answer
1.1K+ views

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.
                }
            });
        });     
Dimitar
Telerik team
 answered on 16 Jan 2018
3 answers
479 views

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

Ivan Danchev
Telerik team
 answered on 16 Jan 2018
4 answers
187 views
<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?

Preslav
Telerik team
 answered on 16 Jan 2018
1 answer
133 views

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

 

 

Ivan Danchev
Telerik team
 answered on 16 Jan 2018
2 answers
665 views
Hi, 

I was trying to create data grid, One column is Dropdownlist.  I want  to pass the dynamic  datasource from the Model. where Model is List<object>  . But the ForeignKey cloumn accepts only SelectList as second parameter. But I want  to make this dynamic i.e model.

See Below)

Current Functionality :

  columns.ForeignKey(s => s.FaceId, SelectList)

I need like   columns.ForeignKey(s => s.FaceId, x => x.FacesList)

Please suggest me to achieve this  functionality.

Thanks
Sunder
Darron
Top achievements
Rank 1
Iron
 answered on 15 Jan 2018
7 answers
216 views
I created a custom download via http://www.telerik.com/download/custom-download

I was under the impression that I could use this to replace a reference to kendo.all.min.js.

We're using requirejs in our app and although the kendo.all file works fine, the custom.js breaks our app. We get reference errors for kendo.data doesn't exist.

Is there fundamental difference between referencing kendo in the .all js file vs a custom download that I'm missing?
Misho
Telerik team
 answered on 15 Jan 2018
14 answers
459 views
The record is removed when cancelling the edit of a new record.

JSFiddle: http://dojo.telerik.com/adAZa

Steps:
1. Click Add new Record
2. Click Update
3. Click Edit
4. Click Cancel

Record is Gone.

Click Refresh

Record is back!
Stefan
Telerik team
 answered on 15 Jan 2018
8 answers
975 views

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.

Stefan
Telerik team
 answered on 15 Jan 2018
1 answer
90 views

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

 

Stefan
Telerik team
 answered on 15 Jan 2018
3 answers
365 views

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

Tyler
Top achievements
Rank 1
 answered on 12 Jan 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?