Telerik Forums
Kendo UI for jQuery Forum
4 answers
216 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
190 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
711 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
252 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
500 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
1.0K+ 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
106 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
409 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
1 answer
5.0K+ views

This is Kendo ASP MVC though the question is about DataSource.

Our code has two dropdowns.  When the `onchange()` for the first fires it calls `$("#classDropDown").data("kendoDropDownList").dataSource.read();` to force the second one to update.

<%: Html.Kendo().DropDownList().Name("speciesDropDown")
          .DataTextField("Text")
          .DataValueField("Value")
          .DataSource(source =>
          {
              source.Read(read =>
              {
                  read.Action("GetNLSSpecies", "RefData").Data("noFilters");
              });
          })
          .HtmlAttributes(new { style = "width: 50%" })
          .Filter(FilterType.Contains)
%>
...
<%: Html.Kendo().DropDownList().Name("classDropDown")
          .DataTextField("Text")
          .DataValueField("Value")
          .DataSource(source =>
          {
              source.Read(read =>
              {
                  read.Action("GetClassData", "RefData").Data("mergeData()");
              });
          })
          .HtmlAttributes(new { style = "width: 50%" })
          .Filter(FilterType.Contains)
%>


Elsewhere ...

$('#speciesDropDown').on('change', function (event) {
    ...
    $("#classDropDown").data("kendoDropDownList").dataSource.read();
}


The `mergeData()` function is called to provide data from the Javascript to the server.  The **problem** is that because I'm calling this as a function it is **NOT** called during the `dataSource.read()`.  But it is called initially when the page first loads.  

Obviously I could change this to `mergeData` (ie. not a function) but it is the simplest case.  I'm actually trying to pass arguments, something like:

.Data("mergeData('getSpeciesDropdownObj','getShownOrRequired(\"OtherClass\")')")


This seems like a bug to me.  Does it to you?  

I originally posted this at https://stackoverflow.com/questions/48087808/mvc-kendo-grid-read-action-datafunction-not-called-on-a-forced-datasource-re and had a conversation about though the question didn't really get answered.  (I have since been given a login so I can post here).
Stefan
Telerik team
 answered on 12 Jan 2018
2 answers
1.0K+ views

I have dropdown value and if there is value X, I want the next cell to be not editable or even better if hidden. Like shown in picture y.png.

If  there is value Y, i want the next cell to be editable. Like shown in picture x.png.

 

 

How can I achieve this? 

Georgi
Telerik team
 answered on 12 Jan 2018
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
DatePicker
Spreadsheet
Upload
ListView (Mobile)
ComboBox
TabStrip
MultiSelect
AutoComplete
ListView
Menu
Templates
Gantt
Validation
TreeList
Diagram
NumericTextBox
Splitter
PanelBar
Application
Map
Drag and Drop
ToolTip
Calendar
PivotGrid
ScrollView (Mobile)
Toolbar
TabStrip (Mobile)
Slider
Button (Mobile)
Filter
SPA
Drawing API
Drawer (Mobile)
Globalization
LinearGauge
Sortable
ModalView
Hierarchical Data Source
Button
FileManager
MaskedTextBox
View
Form
NavBar
Notification
Switch (Mobile)
SplitView
ListBox
DropDownTree
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
ColorPicker
Pager
Styling
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
ScrollView
Switch
TextArea
BulletChart
Licensing
QRCode
ResponsivePanel
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
ContextMenu
TimePicker
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
AIPrompt
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
StockChart
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
SegmentedControl
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?