Telerik Forums
Kendo UI for jQuery Forum
1 answer
104 views
I have a node.js/Express Project. I have downloaded the Kendo UI Professional demo. I've saved the files in my root directory . When I run the demo code solutions they do not render. I'm using handlebars for formatting. I have the src link's on my main page between head tags to the dependencies. Any insight on what I'm doing wrong would be greatly appreciated .
Petyo
Telerik team
 answered on 20 Mar 2015
5 answers
316 views
I'm trying to wrap my head on using TreeView with options set to checkChildren=false and checkboxes.checkChildren=true. See the attached code, for simplicity it is derived from the TreeView / Checkboxes demo. Actual program has a larger tree all loaded at startup, and one day it may be loaded progressively.

1) Setting loadOnDemand=false, checking the non-expanded root the children are not seen by the checkedNodeIds().

2) Visiting the tree with the visitHDS(...) (Visit Tree button) function once the hierarchical datasource is bound to the tree changes the behaviour and checkedNodeIds() reports all checked children.

3) The "Change Template" button trigers template change function ( $("#change").click(function() { ...} ) tha uses treeView.setOptions(...). To force the update the tree treeView.setDataSource(...) method is used.

Some questions/observations:
a) Is it the intended behaviour?
b) Setting loadOnDemand=false makes the template change faster, also, in the future the tree may be loaded lazily from server.
c) Should I use an alternative function to checkedNodeIds?
d) Why visitHDS(...) "fixes things up? Why it works only after the hierarchical datasource is used by a tree.
e) Is there a better method for rerendering the tree after the template change  than treeView.setDataSource? (tried treeView.dataSource.read() but it is not faster and quite distruptive.
Alex Gyoshev
Telerik team
 answered on 20 Mar 2015
1 answer
251 views
Because my table is very large I set minLength to 5. I use server filtering.
If I write testing in auto-complete I get some results. But when I empty (with delete or backspace) auto complete, server filtering is perform without parameters. I then load a lot of data, which complete freeze the browser.

How can I prevent server filtering (I want to prevent request) when auto complete text-box is emptied. Any maybe also close the popup.
Alexander Valchev
Telerik team
 answered on 20 Mar 2015
1 answer
395 views
I am trying to bind local data to kendo-grid.
data is binded properly at startup but when i edit grid (inline editing) data change is not reflected to json object.
grid shows modified data properly but is not reflected in json object.
here is my code. my project is in angularjs.

[html]
<div kendo-grid="policygrid" k-data-source="riskFilterList" options="mainGridOptions" k-rebind="selectedType"></div>
[/html]

[js]

    $scope.GridColumns = [
      {
          field: "LineFieldName", title: "Line Field Name", editor: columnNameDropDownEditor,
          template: function (e) {
              if (e.LineFieldName) {
                  return e.LineFieldName.DisplayName;
              }
              else {
                  return "";
              }
          }
      },
      { field: "Operator", title: "Operator", editor: operatorDropDownEditor },
      { field: "Value", title: "Value" },
      { field: "Method", title: "Application Method", editor: methodsDropDownEditor },
      {
          command: ["edit", "destroy"], title: " ", width: "180px"
      }
    ];

 function columnNameDropDownEditor(container, options) {


        $('<input required data-text-field="DisplayName" data-value-field="ColumnName" data-bind="value:' + options.field + '"/>')
            .appendTo(container)
            .kendoDropDownList({
                dataTextField: "DisplayName",
                dataValueField: "ColumnName",
                autoBind: true,
                dataSource: new kendo.data.DataSource({
                    pageSize: 20,
                    data: $scope.linecolumn
                })
            });
    }

    function operatorDropDownEditor(container, options) {
        $('<input required data-bind="value:' + options.field + '"/>')
            .appendTo(container)
            .kendoDropDownList({
                autoBind: true,
                dataSource: new kendo.data.DataSource({
                    pageSize: 20,
                    data: $scope.operator
                })
            });
    }

    function methodsDropDownEditor(container, options) {

        $('<input required data-bind="value:' + options.field + '"/>')
            .appendTo(container)
            .kendoDropDownList({
                autoBind: true,
                dataSource: new kendo.data.DataSource({
                    pageSize: 20,
                    data: $scope.methods
                })
            });
    }

    $scope.riskFilterList1 = [];

    $scope.dataSource = new kendo.data.DataSource({
        data: new kendo.data.ObservableArray($scope.riskFilterList1),
    });

    $scope.mainGridOptions = {
        dataSource: $scope.dataSource,
        sortable: false,
        pageable: false,
        resizable: true,
        toolbar: ["create"],
        columns: $scope.GridColumns,
        editable: { mode: "inline" },
        save: function (e) {
            this.refresh();
        },
        cancel: function (e) {
            console.log("cancel", e);
        }
    };

[/js]
Alexander Valchev
Telerik team
 answered on 20 Mar 2015
2 answers
352 views
As an example of a sample extend operation, take a look at this link: Make cell readonly in Kendo Grid if condition is met

Using the following code will cause AngularJS to throw the error at the end of this post:

var oEditCell = kendo.ui.Grid.fn.editCell;
var oInit = kendo.ui.Grid.fn.init;
kendo.ui.Grid = kendo.ui.Grid.extend({
    init: function () {
        oInit.apply(this, arguments);
        if (typeof this.options.beforeEdit === "function") {
            this.bind("beforeEdit", this.options.beforeEdit.bind(this));
        }
    },
    editCell: function (cell) {
        var that = this,
            cell = $(cell),
            column = that.columns[that.cellIndex(cell)],
            model = that._modelForContainer(cell),
            event = {
                container: cell,
                model: model,
                field: column.field
            };
 
        if (model && this.trigger("beforeEdit", event)) {
            // don't edit if prevented in beforeEdit
            if (event.isDefaultPrevented()) return;
        }
 
        oEditCell.call(this, cell);
    }
});
kendo.ui.plugin(kendo.ui.Grid);

This code will cause the following error in AngularJS:

Error: [$compile:multidir] Multiple directives [kendoGrid, kendoGrid] asking for 'kendoGrid' controller on: <div kendo-grid="">
http://errors.angularjs.org/1.2.15/$compile/multidir?p0=kendoGrid&p1=kendoGrid&p2='kendoGrid'ontroller&p3=%3Cdiv%20kendo-grid%3D%22%22%3E
Kiril Nikolov
Telerik team
 answered on 19 Mar 2015
1 answer
101 views
I had posted this question here:
http://www.telerik.com/forums/grid-multi-select-feature

With this example:
http://dojo.telerik.com/aSepe

Which I've updated to the latest version here:
http://dojo.telerik.com/osOyi

Now that the beta is released I think maybe I need to ask the question again.

I am not seeing the behavior I expected.  When I open the grid, click on the filter, I see 8 things, then I add 8 more things and then filter, and the list has not changed.

Any help is appreciated...

Thanks
Brett
Top achievements
Rank 1
 answered on 19 Mar 2015
1 answer
219 views
i have tree list with 'expanded: true'

i want this tree to stay expand all the time and to prevent the user collapse it.

i tried: expandable: false on first column but it doesn't work.

so, what can i do?

thanks!
Alex Gyoshev
Telerik team
 answered on 19 Mar 2015
3 answers
173 views
I'm evaluating Kendo UI Mobile for Phone Gap and the AppBuilder Plugin for Visual Studio.  

I've unable to run my test application using "Run in Simulator".  I get the error (at the end of this post) while the status bar just spins with the message "Launching Simulator....".

I've also tried the stand alone AppBuilder and I get the same results.
I've tried opening Visual Studio running as Administrator .
I've given Full Permissions to Everyone for the "C:\ProgramData\XDMessagingv4" path.
The test app I created can be built in the cloud and works on the AppBuilder companion app on my device (iPhone 6) correctly.
I'm currently on a 30 Day trial account if this makes a difference.

Please advise.

[2015-03-17 14:50:49.714] Log (Info,Medium): The user 'xxxxxxxx' logged in to Telerik Platform.
[2015-03-17 14:50:51.248] Log (Info,Medium): Account with sufficient subscription found. Switching to account xxxxxxxx...
[2015-03-17 14:50:51.915] Log (Info,Medium): Switched to account xxxxxxxx.
[2015-03-17 14:51:05.220] Log (Exception,High): System.UnauthorizedAccessException: Access to the path 'C:\ProgramData\XDMessagingv4\14296IceSimulatorConfig\acf6bfa5-6357-418e-8b26-5e88bc6d3fc1.msg' is denied.

Server stack trace: 
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
   at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
   at System.IO.StreamWriter..ctor(String path, Boolean append)
   at System.IO.File.CreateText(String path)
   at XDMessaging.Transport.IOStream.XDIOStreamBroadcaster.SendToChannel(String channelName, String dataType, String message)
   at XDMessaging.Transport.IOStream.XDIOStreamBroadcaster.SendToChannel(String channelName, String message)
   at Telerik.BlackDragon.Client.Services.Implementation.CommunicationService.SendMessage(String channelName, String message)
   at Telerik.BlackDragon.Client.Mobile.Simulator.Services.SimulatorService.<RunSimulatorAsync>d__2.MoveNext()

Exception rethrown at [0]: 
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess(Task task)
   at Telerik.BlackDragon.Client.Simulator.RunInSimulatorMenuCommandBase.<RunSimulatorAsync>d__0.MoveNext()

Zdravko
Telerik team
 answered on 19 Mar 2015
3 answers
328 views
I have ListView like following:

    <div ng-controller="patientSearchCtrl">
        <div kendo-list-view id="listView" k-data-source="source">
            <div class="product" k-template>
                <h3>{{ dataItem.First_Name }}</h3>
                <p>{{ dataItem.Last_Name }}</p> 
            </div>
        </div>
        <div kendo-pager k-data-source="source"></div>
    </div>


And following AngularJS code:

    angular.module("alertApp", ["kendo.directives"])
            .controller("patientSearchCtrl", function ($scope, $http) {
                var product;
                $http.get('http://localhost:1242/Api/PatientSearch?firstName=Bar&lastName=wells&pageIndex=0&pageSize=10&sortingOrder=FIRST_NAME').
                  success(function (info, status, headers, config) {                     
                      product = info[0]["Table"];
                      console.log(product); 
                  }).
                  error(function (data, status, headers, config) {
                      console.log('Error: ' + data);
                  });
                $scope.source = new kendo.data.DataSource({
                    data: product,
                    pageSize: 1
                });
            });                                                                                                  
   

  console.log(product); is logging data. In Chrome it looks like:
    [Object]
          0: Object
                  DOB: "07-29-1969"
                  First_Name: "Barbara"
                  Last_Name: "Wells"
                  PatientKey: 3
                  RowIndex: 1
                  
I'm using telerik.kendoui.professional.2014.3.1411.trial version.













Petyo
Telerik team
 answered on 19 Mar 2015
3 answers
158 views
At the top of your AngularJS + Kendo introduction documentation (http://docs.telerik.com/kendo-ui/AngularJS/introduction) you specifically mention: "If you are using AngularJS then you probably want to use Angular's own routing mechanism and data binding. Do not mix that with Kendo MVVM."

However, in your Kendo DataSource vs AngularJS Scope documentation (http://docs.telerik.com/kendo-ui/AngularJS/data-source), you specifically mention the problem of using the grid with a standard Javascript object as it will not reflect changes in the grid. You then say that the "fix" to this is to use an ObservableArray as the grid's data source. However, an ObservableArray is part of your MVVM framework.

In light of this, what is Telerik's suggested approach? I tend to agree that AngularJS models and Kendo MVVM should not be mixed. However, then how can the grid work correctly with plain AngularJS Javascript models?

And the reverse is also problematic - if using Kendo MVVM as the View Model, then creating other widgets (eg DateTimePicker, ComboBox, etc) using the Angular-Kendo bindings will fail to appropriately trigger events on the MVVM constructs like ObservableObject, ObservableArray, etc. 

Can you please provide guidance on whether or not Kendo MVVM should be used with Angular-Kendo or not? If yes, please provide examples of how to bind Angular-Kendo widgets to MVVM models complete with event triggering. If no, please provide examples of how to work correctly with the grid when using plain Javascript objects as the DataSource.
Kiril Nikolov
Telerik team
 answered on 19 Mar 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
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
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?