Telerik Forums
Kendo UI for jQuery Forum
1 answer
140 views
Hi.

We have a problem with Radar Chart component from Kendo UI Professional 2014.3.1316 package using via kendo.all.js script.
When mouse hover chart area exception "Uncaught TypeError: undefined is not a function" occures inside moveLine() function.
It seems  that the problem is in these lines:
slot = axis.getSlot(axis.pointCategoryIndex(point));
lineStart[dim] = lineEnd[dim] = slot.center()[dim];
getSlot function returnes an object of Ring type but it has no extension method center() for it.

Actually we can not see any side affects of this bug but it is no so good to have any errors in browser console.
Could you help us with this issue? probably we need to include some additional script where center() method for Ring type is implemented?
Thank you in advance.







T. Tsonev
Telerik team
 answered on 06 Feb 2015
1 answer
1.0K+ views
Hi.

I have decimal values in my grid output and use "{0:N}" for column formatting. As a result it truncates everything after two decimal digits. This is good when it has those digits I do not need, for example 1.45286 -> 1.45. But when the value has less than two decimal digits it adds trailing zeros: 2 -> 2.00; 3.5 -> 3.50, and this is not what I want. Instead, I would prefer to keep them 2 & 3.5 respectively. The only thing I can change is to specify how many decimal digits I want to leave, but it will still keep those zeros if there are less digits in the value.

Is there a way to do it in Kendo?
Kiril Nikolov
Telerik team
 answered on 06 Feb 2015
1 answer
169 views
I would like to create a specific hierarchy of Manufacturers, Cars and Parts.

To achieve this, I would like to subclass kendo.data.Node as follows:

var Manufacturer = kendo.data.Node.extend({
//...
});
var Car = kendo.data.Node.extend({
//...
});
var Part = kendo.data.Node.extend({
//...
});

I would then like to subclass kendo.data.HierachicalDataSource, to represent such a hierarchy.

Question 1: How can I achieve that?

Data comes from a RESTful JSON service located at:
http://<ip address>/api/v1/manufacturers (GET, POST)
http://<ip address>/api/v1/manufacturers/<mid> (GET, PUT, DELETE)
http://<ip address>/api/v1/manufacturers/<mid>/cars (GET, POST)
http://<ip address>/api/v1/manufacturers/<mid>/cars/<cid> (GET, PUT, DELETE)
http://<ip address>/api/v1/manufacturers/<mid>/cars/<cid>/parts (GET, POST)
http://<ip address>/api/v1/manufacturers/<mid>/cars/<cid>/parts/<pid> (GET, PUT, DELETE)

Then I would like to instantiate my subclassed hierarchy to use this JSON service. 

Question 2:  How can I achieve that?





Alex Gyoshev
Telerik team
 answered on 06 Feb 2015
6 answers
5.8K+ views
I have a Kendo Grid we are using as part of a Document Manager style setup. We would like to have heartbeat functionality that automatically refreshes the grid when it detects changes on the server, checking every 60 seconds or so. Unfortunately, one of the objects in the grid is a Silverlight object which must remain in place to monitor a file on the local user's system (in the Silverlight Isolated Storage). If the UI gets refreshed, we lose the Silverlight object and it has to be regenerated.

I would like to stop any UI refresh that would result in the same document listing as what is currently there. Essentially, I need to use a hasChanges type functionality, but I don't know where to put it.

I've reviewed dataSource.hasChanges but the example just shows a fetch and then add, I don't know how this relates to the .read function automatically refreshing the UI.

Some example code to show where I'm coming from in this:

fileInformationDataSource = new kendo.data.DataSource({
        transport: {
            read: function (options) {
                kendo.ui.progress($("#fileInformationGrid"), true);
                var id = options.data.parentId;
                showHidden = options.data.showHidden;
                if (!id) { id = selectedTreeFolderId; }
                if (!showHidden) { showHidden = false; }
                // the below is a Spring implementation, it's basically just a fancy javascript to C# function caller with specific parameters
                DocumentWebService.GetFolderTreeInformation(documentTreeType, id,
                    utcOffsetInMins, isDstSupported, userId, showHidden,
                    function (result) {
                        options.success(result);
                        initializeMyDocuments();
                        kendo.ui.progress($("#fileInformationGrid"), false);
                    },
                    function (e) { options.error(e); }
                );
            }
        },
        batch: true,
        pageSize: 8,
        schema: {
            model: {
                id: "Id",
                fields: {
                    Id: { editable: false, nullable: true },
                    Name: {}
                }
            }
        }
    });

fileInformationGrid = $("#fileInformationGrid").kendoGrid({
    dataSource: fileInformationDataSource, sortable: false, pageable: true, autoBind: false,
    columns: [ /*my columns implementation */ ], selectable: "row",
    change: function () { /* starts a separate ajax call to pull file details for loading into another piece of UI */ }
});

// Read function implemented inside the heartbeat
// There is a separate Kendo Tree View which shows explorer style folder navigation, the selectedId is coming from that UI
fileInformationDataSource.read({ parentId: selectedId });





Alexander Valchev
Telerik team
 answered on 06 Feb 2015
7 answers
466 views
Hi Telerik,

We have an issue with kendo ui  Combobox control. Scenario is folowing: user wants to filter data not only by Company name but also by city in which this company is located.
Here is example of data :
{"Id":1,"Name":"AAA","City":"Amsterdam","Country":"The Netherlands"}

We wand to use composite client filter on Combobox together with Datasource. I simplified solution and put it here (http://jsfiddle.net/MbvgC/1/). Problem is that this solution is not work completely. When you have only one filter, then everything is ok, but if you add additional filter then combobox stops display any data:

filter: { 
        logic: "or",
        filters: [
               { field: "Name", operator: "contains" },
               { field: "City", operator: "contains" }
       ]
},

Can you tell us what is wrong with this approach?

Best regards,
Kiril Nikolov
Telerik team
 answered on 06 Feb 2015
1 answer
254 views
When binding a checkbox to an array property, it works only if array contains strings, but does not work with numbers:

<label><input type="checkbox" value="1"   data-bind="checked: colors" />Red</label>

var viewModel = kendo.observable({
    
//colors: ["1", "2", "3"] //works
    colors: [ 1, 2, 3 ] //does not work
});

Would be nice to remove this limitation to have a cleaner view model.
Here's a dojo representing it: http://dojo.telerik.com/uHaNO

Thanks.
Alexander Popov
Telerik team
 answered on 06 Feb 2015
1 answer
93 views
I'm trying to initialize Kendo Menu Widget inside the header of PanelBar. So far, I have been stuck with getting it to work together. What's the best way to achieve this? 
Dimiter Madjarov
Telerik team
 answered on 06 Feb 2015
3 answers
436 views
Hi,

we have problem with the binding, respectively the unbinding of the following viewmodel. If we try to undind the viewmodel we get an exception (undefined is not a function) which comes from the Binder.destroy method. kendo version is: 2013.3.1324

<div class="importantData" data-template="importantDataItem-Template" data-bind="source: getProperties"></div>


this.viewModel = kendo.observable({
                vm: this.ctx.get_viewModel(),
                properties: ["Modified"],
                getProperties: function () {
                    var vm = this.get("vm");
                    var array = [];
 
                    var properties = this.get("properties");
                    var length = properties.length;
                    for (var i = 0; i < length; i++) {
                        array.push(vm.get(properties[i]));
                    }
                    return array;
                }
            });
             
             
            kendo.bind(this.container, this.viewModel);

The other problem is, that the calculated function getProperties is called 4 or 5 times within the binding process.

Thanks in advance!
Michael
Alexander Valchev
Telerik team
 answered on 06 Feb 2015
2 answers
700 views
Hi,
I've added a kendo button which looks like this in HTML -
<a data-uid="a26bc1df-cc6a-402c-b5be-a983914ef703" class="q-btnHover k-button k-button-icon ng-scope" id="Refresh" data-overflow="auto" style="visibility: visible;"><img alt="icon" class="k-image" src="refresh.png"></a>

I want to change the image to refresh-hover.png on mouse hover on the button.

Please help.
Thanks and Regards
Devna
Devna
Top achievements
Rank 1
 answered on 06 Feb 2015
5 answers
213 views
Hi, I Have just started looking at the Kendo grid for the first time. I am looking for a (HTML5) grid that I can use for both desktop web and mobile (hyrib) applications.

I notice the grid has the scrolling mode of virtual. I have taken one of the online examples, set the scrolling to virtual, and also tried setting the mobile property to true, and 'tablet', however it does not appear to do the "kinetic " type of scrolling, at least not when I am running it in the desktop browser (Chrome) . 

....when I run an other mobile example, eg the endless-scrolling.html mobile example, this *does* exhibit the kinetic scrolling when run on my desktop Chrome, so I thought the grid would too...

So, my main question is, can the grid use the mobile type of kinetic / friction scrolling when being (at least when being run on a mobile device?)

Thanks in advance for any help/suggestions


Peter
Top achievements
Rank 1
 answered on 06 Feb 2015
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
Drag and Drop
Map
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
Licensing
ScrollView
Switch
TextArea
BulletChart
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
TimePicker
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
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
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?