Telerik Forums
Kendo UI for jQuery Forum
1 answer
115 views

It seems that even though the internally created object should be getting a new datasource it is being shared across objects. It is kind of a hard behavior to explain so here is the code. I assume that I am doing something wrong but I don't really know what is expected since I can't seem to find a good example of complex MVVM models with differing datasources... I can use an array and that works fine but if I change it to observable array or a data source I get an unexpected result. So like I said I am probably doing it wrong?

Here is an example of the behavior that I am seeing.

<div id="example">  
    <div >     
     <button data-bind="events{click:addItem}">add</button>
     <ul data-template="item-template" data-bind="source: items" data-value-update="onChange"></ul>
    </div
</div
  <script id="item-template" type="text/x-kendo-template">
    <li>
      <button data-bind="events{click:addSubItem}">add</button>
      <label  data-bind="text: name"></label>
      <ul data-template="sub-item-template" data-bind="source: subItems" data-value-update="onChange"></ul>
    </li>
  </script>
  <script id="sub-item-template" type="text/x-kendo-template">
    <li><label  data-bind="text: name"></label></li>
  </script>
    <script>
        $(document).ready(function() {
            var mySubClass = kendo.Class.extend({
                init:function(){},
            name: ''
            });
            var myClass = kendo.Class.extend({
              init: function(){},   
              name: 'ParentItem',
         subItems: new kendo.data.DataSource({data:[]}),
              addSubItem: function(){
                var item = new mySubClass();
                item.name = 'item: ' + (this.subItems.data().length + 1);
                this.subItems.add(item);
              }
            });
            var viewModel = kendo.observable({
               items: new kendo.data.DataSource({data: [new myClass()]}),
               addItem: function(){ this.items.add(new myClass());}
            });
 
            kendo.bind($("#example"), viewModel);
        });
    </script>
 
  

Stefan
Telerik team
 answered on 05 Oct 2016
3 answers
459 views
Hi,

I have a tree view with a list of nodes which have checkboxes. Once a user checks some of the nodes I persist this information to the database.  I then want to load this info back onto the page.  I cannot seem to get this working.

I'm doing something like:

 $("#treeview").kendoTreeView({
                checkboxes: {                    
                    template: "<input type='checkbox' #= CheckItem(item.IsSet) # />"
                },
                dataSource: inline,
                dataTextField: ["ComponentActionName"],
                loadOnDemand: false
            });

function CheckItem(IsSet) {
            if (IsSet) {
                return "checked='checked'";
            }
            else {
                return "";
            }
        }

This actually works fine, in that the UI shows the correct nodes checked.  The problem is that when I try to save this data again with a function like:

function checkedNodeIds(nodes, checkedNodes) {
            for (var i = 0; i < nodes.length; i++) {
                if (nodes[i].checked) {
                    checkedNodes.push(nodes[i].ComponentActionName);
                }

                if (nodes[i].hasChildren) {
                    checkedNodeIds(nodes[i].children.view(), checkedNodes);
                }
            }
        }

nodes[i].checked shows as undefined for the nodes unless I manually unselect and reselect them.  Is there a property similar to the dataTextField where I can specify the field on the data which indicates if the node should be checked or any other way of achieving this?

Thanks,
Keith
Alex Gyoshev
Telerik team
 answered on 05 Oct 2016
5 answers
126 views
I am getting an error like " kendo.all.min.ext:79 Uncaught TypeError: Cannot read property '_grid' of undefined" when I tried to increase the size of the column directly . However, when I first clicked on the spreadsheet ( it adds the scrollbar )  and then increased the column size , I didn't get that error . Please advice.
Dimiter Topalov
Telerik team
 answered on 05 Oct 2016
5 answers
242 views

I'm trying to configure a DnD from a TreeList view onto custom sidebar. I'm using Angular 1.x, and the the sidebar is configured as a directive complete with its own scope.

Is there a recommended way to transfer the data model that's tied to the treelist row to and from this sidebar given they are separate in scope?

Looking as many of the demos, it was difficult for me to determine how exactly to apply those techniques to my scenario.

 

Stefan
Telerik team
 answered on 05 Oct 2016
1 answer
63 views

Using the Kendo UI Angular 2 Beta with a project using NG Upgrade causes the following error -

Only selectors matching element names are supported, got: [kendoGridColGroup]

According to the Angular 2 team using attribute selectors in components is considered an anti-pattern and should be avoided which is why they added this hardblock check in the NG Upgrade bootstrapper (They are removing this as it is obviously causing issues with 3rd party libraries).  Are the Kendo team aware they should be avoiding attribute selectors?  Might be something they should discuss with the Angular team in case they start blocking this in the regular Bootstrapper as well.

 

Dimo
Telerik team
 answered on 05 Oct 2016
1 answer
225 views

Is there a way to enable filtering in the list if it does not use a dataSource and just binds directly to the HTML ?

 

<ul id="listView">
    <li>Item 1</li>
    <li>Item 1</li>
    <li>Item 1</li>
</ul>

<script>

$("#listView").kendoMobileListView({

filterable: true

});

</script>

 

I do get a textbox to filter, but no matter what I type, nothing comes up!

Stefan
Telerik team
 answered on 05 Oct 2016
1 answer
242 views

Hi,

 

we test our kendo based application with ZAP security scanner Tools. It reports one high security risk caused on kendo.all.min.js file.

Description
Attack technique used for unauthorized execution of operating system commands. This attack is possible when an application accepts untrusted input to build operating system commands in an insecure manner involving improper data sanitization, and/or improper calling of external programs.
URL
https://service.cboxcloud.com/api/kendo/kendo.all.min.js;sleep%20%7B0%7Ds;
Parameter
kendo.all.min.js
Attack
kendo.all.min.js;sleep {0}s;
Solution
If at all possible, use library calls rather than external processes to recreate the desired functionality.
Run your code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which files can be accessed in a particular directory or which commands can be executed by your software....

 

Does anyone know how to reduce or  or eliminate this risk?

 

Attack technique used for unauthorized execution of operating system commands. This attack is possible when an application accepts untrusted input to build operating system commands in an insecure manner involving improper data sanitization, and/or improper calling of external programs.

URL
https://service.cboxcloud.com/api/kendo/kendo.all.min.js;sleep%20%7B0%7Ds;
Parameter
kendo.all.min.js
Attack
kendo.all.min.js;sleep {0}s;

Solution

If at all possible, use library calls rather than external processes to recreate the desired functionality.

 

Run your code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which files can be accessed in a particular directory or which commands can be executed by your software.

Attack technique used for unauthorized execution of operating system commands. This attack is possible when an application accepts untrusted input to build operating system commands in an insecure manner involving improper data sanitization, and/or improper calling of external programs.

URL
https://service.cboxcloud.com/api/kendo/kendo.all.min.js;sleep%20%7B0%7Ds;
Parameter
kendo.all.min.js
Attack
kendo.all.min.js;sleep {0}s;

Solution

If at all possible, use library calls rather than external processes to recreate the desired functionality.

 

Run your code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which files can be accessed in a particular directory or which commands can be executed by your software.

Attack technique used for unauthorized execution of operating system commands. This attack is possible when an application accepts untrusted input to build operating system commands in an insecure manner involving improper data sanitization, and/or improper calling of external programs.

URL
https://service.cboxcloud.com/api/kendo/kendo.all.min.js;sleep%20%7B0%7Ds;
Parameter
kendo.all.min.js
Attack
kendo.all.min.js;sleep {0}s;

Solution

If at all possible, use library calls rather than external processes to recreate the desired functionality.

 

Run your code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which files can be accessed in a particular directory or which commands can be executed by your software.

Dimo
Telerik team
 answered on 05 Oct 2016
3 answers
447 views

When using keyboard navigation with the dropdownlist, combobox components, you cannot have no items selected in the popup. When you reach the start or end of the list, hitting the up/down arrow key wont deselect the item. In contrast to this behavior, the autocomplete popup doesn't behave the same way. When you reach the start or end of the list in that component, hitting the up/down arrow key will result in none of the items being selected. This is poor user experience in my opinion.

Imagine typing in the autocomplete input box and the popup shows only one result. By (accidently) hitting the up/down key, the item gets deselected and hitting the enter button after that will result in not having selecting an item from the list. Even more so, once you have closed the popup you cannot open the popup again with keyboard navigation. The popup will only get shown again when the text in the input box is changed. Again, this is poor user experience in my opinion.

Any suggestions?

Georgi Krustev
Telerik team
 answered on 05 Oct 2016
3 answers
106 views

Hello,

I have a tree view with check boxes and i wanted to show expander on all nodes with or with out children and loadOnDemand is false.Can i get a solution for this.

http://dojo.telerik.com/anAXE

Magdalena
Telerik team
 answered on 05 Oct 2016
2 answers
170 views

I'm using editor.getRange() function from the Editor Select event to get the current range of an element selected in the Editor.

In Chrome the getRange() function returns the range I would expect.

However in Internet Explorer the getRange() function return the wrong range. 

Why does the same method return 2 different items? The html I'm using in the the editor is as below.

 

<p style="text-align:left;"><strong></strong>Test the range of the following field <span class="dfw-IsMergeField dfw-EditorMergeField" contenteditable="false" data-iscollection="false" data-name="ApplicantAddress" data-path="Mallons.DomainFire.Models.MergeTemplates.FireCertTemplate.ApplicantAddress" id="mergeFieldButton" title="Applicant Address">ApplicantAddress</span> in Chrome and Explorer</p>
<p> </p>

Ruairi
Top achievements
Rank 1
 answered on 04 Oct 2016
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
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?