Telerik Forums
Kendo UI for jQuery Forum
3 answers
1.5K+ views
Hi Guys,
I have a Grid bound to a remote datasource like this

$("#rolesGrid").data("kendoGrid").setDataSource(new kendo.data.DataSource({
            transport: {
                read: {
                    url: "Url1",
                    type: "POST"
                },
                update: {
                    url: "Url2",
                    dataType: "json",
                    type: "POST"
                }
            },
            schema: {
                model: {
                    id: "Id",
                    fields: {
                        Id: { type: "int", editable: false },
                        Name: { type: "string", editable: true },
                        Description: { type: "string", editable: true },
                        Roles: { type: "odata", editable: true }
                    }
                }
            },
            pageSize: 10,
            sort: { field: "Nome", dir: "asc" }
        }));
The Roles field contains a list of custom object; each of this object has some simple properties (int and string).
When the grid is loaded I show a simple count of Roles list for each record.
es
{
     field: "Roles",
     title: "roles",
    template: "<div>#= Roles.length#</div>"
}
I set the edit mode as INLINE.
Is it possible to use a custom template so that text properties are edited with textboxes as usual and  "Roles" property is rendered as, for example, a dropDownList ???

I tried with a template as I'd like to do with popup edit mode but it seems to be useless.

Thanks
Fabio
Viktor Tachev
Telerik team
 answered on 27 Nov 2018
3 answers
516 views
Hi,

I'm trying to use localized strings from kendo.messages.pl-PL.min.js in my kendo grid, but attaching that JS file to my view and executing kendo.culture("pl-PL") doesn't make any changes in grid pager - "No items to display" remains English, not Polish.
How can I use localizations from kendo.messages.pl-PL.min.js? Is there any special way to make it work? Unfortunately, all tutorials mention cultures file only.

Thanks in advance,
GJ
Viktor Tachev
Telerik team
 answered on 27 Nov 2018
1 answer
113 views
Hello, please find the attached file and let me know if we can use mvvm model in this scenario or not. I have 2 ViewModels . I want to have 3 ViewModels in this attached View. Is it possible? 
Dimitar
Telerik team
 answered on 27 Nov 2018
4 answers
171 views
Hello,
          Can we bind 3 observable to different parts of template? The reason to have 3 observable is to have modularity and performance improvement. Earlier we had 2 observable and our object are pretty big. We dont want to have more processing and UI rendering delays so we have thought to have 3 observable .
         Now the thing is we have a window all coded mvvm way. This window needs object to be binded to open , if i bind empty object later , i cannot bind any div with observable object . kendo.bind() doesnt have any output then.
         What would be solution for this?
Neeraj
Top achievements
Rank 1
Veteran
 answered on 27 Nov 2018
2 answers
466 views

Hi,

i have created scheduler using kendo UI, where start time if 12 Mid night so that i can see 24 hours for that day

there is horizontal scroll bar coming which i dont want.

i would like to have default single page view for 24 hours and if i need i can zoom in to view the detail task

how we can do that

Thanks

Siddhartha

Dorian
Top achievements
Rank 1
 answered on 26 Nov 2018
1 answer
299 views

Hi, I think that I found a bug.

I can reproduce it there: 

https://dojo.telerik.com/@foxontherock/EvuWidey

In my app, I need to use "setOptions" sometimes, because I need to change my "columns" collection depending on the data I display.

If I send non-empty data in my setOptions parameter, it looks like they are kept somewhere, they're back later when I try to sort an empty grid.

Steps to reproduct:

1. Initialise with empty data + columns, sortable.
2. Change the dataset, using the kgrid.setOptions(dataSource: {data: [non empty array]})
3. Now, empty the grid with kgrid.dataSource.data([])
4.Click any header to sort the grid.
Surprise!  the original data from step 2 is back!

You can try it easily in my "dojo" sample.

https://dojo.telerik.com/@foxontherock/EvuWidey

For now, what I did is to always use setOptions with empty data, then applying my data after, and it solve my problem. 

But, I take time to mention it to you because I think it's a bug that can happen to someone else.

Thank you

Georgi
Telerik team
 answered on 26 Nov 2018
3 answers
150 views

How can I use the tree view with MVVM while at the same time only fetching the nodes that I need.  The sample shows setting up the observableHierarchy and that is it.  Is it even possible?

 

I know i can set hasChildren to be true on the parent, but how do i then grab the children?

Veselin Tsvetanov
Telerik team
 answered on 26 Nov 2018
2 answers
116 views

Hello can anyone point me to a Visual Studio example of the following Kendo MVVM example code?

https://demos.telerik.com/kendo-ui/mvvm/source

In other words, i would like to seperate this code into "....htm", "....js" modules and put them into the typcial Visual Studio code diretories like /script and ect.

thanks for any pointers

robert
Top achievements
Rank 1
 answered on 23 Nov 2018
1 answer
771 views

I'm getting a "too much recursion" error when using a kendo.observable with nested dependent method. I have a nested observable object that needs to get and set values for a field depending on another field's value, so I used the example from the ObservableObject docs, where you have a field bound to a function that gets or sets a value based on whether a parameter is passed in.  This works great when the function is on the top level of the kendo.observable, but when it's nested several levels deep, there's some odd behavior...  Here's a Dojo example:

https://dojo.telerik.com/UpUcaxaP/2

It seems to work when you call the nested dependent function directly in JS or from the console, but as soon as it's bound to the HTML input field with data-bind, it gives the "too much recursion" error.  If you comment out the "this.set('nestedValue', param);" line, then you don't get the recursion error on binding, but when you change the value in the input box you get "TypeError: d.fields is undefined".  I've tried with both the straight use of "this" and also with the "self" one-liner referenced in my other post, and haven't been able to get it to work correctly.  Any ideas on what I'm doing wrong?

Thanks!

Ivan Danchev
Telerik team
 answered on 23 Nov 2018
5 answers
673 views

Hi,

I'm having trouble troubleshooting an issue specific to iOS platforms (app, not mobile web) regarding dropdownlists. It scrolls perfectly fine on Android and Windows devices along with any device in the simulator. However, on iOS devices (iPhone 6s and iPad tested), the scrolling doesn't work. At times, constantly moving my finger up and down on the list will shift it slightly (as in, less than 1/2 a row's distance), but never consistently nor reliably responsive in matching my finger's movement as it would on android devices.

I have made sure that kendo.mobile.scroller.min.js and kendo.touch.min.js are included (defined in kendo.all.min.js). I have also tried finding if there are scrollers inside the DropDownList ( $("#leaveType").data("kendoDropDownList").list.data("kendoMobileScroller") returns "undefined" ) interfering with the functionality and came up with nothing.

Screenshot that shows how the area is rendered, is attached. Clicking on the top blue select button shows the dropdownlist.

Below is the relevant code, which itself is inside a kendo view navigated to via a dashboard.

$("#leaveType").kendoDropDownList({
                    dataSource: pageModel.get('leaveTypeDS'),
                    dataTextField: "Description",
                    dataValueField: "Leave_Code",
                    optionLabel: "--Select--",
                    optionLabelTemplate: '<span class="leaveType-option" onclick="debugger;">--Select--</span>',
                    valueTemplate: '<span class="leaveType-value">#:data.Description#</span>',
                    template: '<span class="applyLeave-dropdownList">#:data.Description#</span>',
                    valuePrimitive: true
                });

applied to the following:

<input id="leaveType" data-bind="value: mainInfo.leaveType"  />

 

Any help and/or insight is greatly appreciated. Thanks!

Ivan Danchev
Telerik team
 answered on 23 Nov 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
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
ContextMenu
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?