Telerik Forums
Kendo UI for jQuery Forum
0 answers
82 views
hi, i need use "aspnetmvc-ajax" in DropDownTree.dataSource but i got Error: "Uncaught TypeError: data.Data is undefined"
$("#dropdowntree").kendoDropDownTree({ 
     dataSource: { 
          type: "aspnetmvc-ajax", 
          transport: { 
              read: { url: "xxxxxxxxxxxxxxxxxxxxxxxxxxx" , data: forgeryToken, dataType: "json" }
 }}

thank you

vahid
Top achievements
Rank 2
Iron
Iron
Iron
 updated question on 01 Jun 2022
3 answers
552 views

Hello!

I wonder if there is a possibility to create an option ala "select all", but customize it to selecting only second-level nodes or nodes with specified ids?

Elisa
Top achievements
Rank 1
Iron
 answered on 25 May 2022
1 answer
82 views

I'm using a dropdowntree editor on a grid column. The bound field is a list of objects.

  • How would I prevent the top-level from getting selected when using check boxes with CheckAll true? I only want the second level items.
  • Conversely, how would I select the top level if any of the second level items are checked?

Ex. I would not want 18' checked here, just the two children on the 2nd level:

Editor:

function equipmentEditor(container, options) {
        let ds = new kendo.data.HierarchicalDataSource({
            data: _equipmentTypes,
            schema: {
                model: {
                    children: "Items"
                },
            },
        });

        $("<input data-bind='value: EquipmentTypes'/>")
            .attr("name", options.field)
            .appendTo(container)
            .kendoDropDownTree({
                checkboxes: {
                    checkChildren: true
                },
                checkAll: true,
                autoWidth: true,
                dataTextField: "Description",
                dataValueField: "Code",
                dataSource: ds,
                autoClose: false,
                tagMode: "single",
            });

_equipmentTypes data used in dataSource:

[
    {
        "Code": "17'",
        "Description": "17'",
        "Items": [
            {
                "Code": "T17.DUMP",
                "Description": "17' Dump Trailer",
                "Items": []
            }
        ]
    },
    {
        "Code": "18'",
        "Description": "18'",
        "Items": [
            {
                "Code": "T18.FLAT",
                "Description": "18' Flatbed Trailer",
                "Items": []
            },
            {
                "Code": "T18.TANK",
                "Description": "18' FoodGrade Tank Trailer",
                "Items": []
            }
        ]
    }
]

 

Posted object:

"EquipmentTypes": [
            {
                "Code": "17'",
                "Description": "17'",
                "Items": [
                    {
                        "Code": "T17.DUMP",
                        "Description": "17' Dump Trailer",
                        "Items": [],
                        "id": "",
                        "index": 0,
                        "checked": true,
                        "_level": 1,
                        "_tagUid": "b13353ee-cbd3-4226-8b4c-080d4ea775e4"
                    }
                ],
                "index": 0,
                "expanded": true,
                "checked": true,
                "_level": 0,
                "_tagUid": "c0785273-c8bd-4a18-8598-de5d7ba6c16e"
            },
            {
                "Code": "T17.DUMP",
                "Description": "17' Dump Trailer",
                "Items": [],
                "id": "",
                "index": 0,
                "checked": true,
                "_level": 1,
                "_tagUid": "b13353ee-cbd3-4226-8b4c-080d4ea775e4"
            }
        ],

   
Martin
Telerik team
 answered on 11 May 2022
1 answer
93 views

The title says it all

How to get the data item from the node in the select event?

Neli
Telerik team
 answered on 23 Feb 2022
1 answer
231 views

Scroll of  Dropdown tree  is not working when navigate through keyboard's down arrow.

We have similar implementation like below link. and in the provided link scroll bar is also not working when we navigate trough keyboard.

Link: https://dojo.telerik.com/oVoboJeq 

Please  let us know solution/workaround for it. 

 

Thanks!!

Martin
Telerik team
 answered on 27 Oct 2021
1 answer
1.2K+ views

I like to bind to this JSON below. De JSON should fill the dropdownlist. The first item would have a value of 0 and a text of Unknown.

{
    "0": "Unknown",
    "1": "Not executed",
    "2": "Not reported",
    "3": "Executed and Reported",
    "4": "Not to be executed",
    "select": null,
    "table": null
}

But somehow the dropdownlist only accepts JSON like:

[
    {​ "value": 0, "text": "Unknown" },
    {​ "value": 1, "text": "Not executed" }​,
    etc.,
]

Is it possible to configure the ddl with the most above JSON?

Neli
Telerik team
 answered on 23 Jun 2021
4 answers
780 views

Hi, 

i have a drop down tree created, as shown in the attachment below

i need to checked all the checkboxes by default. How to do this?

Petar
Telerik team
 answered on 10 Mar 2021
7 answers
1.1K+ views

In the change event, is there any way to get the underlying data item of the selected node?

For a treeview control we can get the data item with something like this in the select event:

var dataItem = myTree.dataItem(e.node);

However, there's no "node" attribute in the change event for DropDownTree.

How do we do this?

Ivan Danchev
Telerik team
 answered on 29 Sep 2020
7 answers
781 views

Hi,

I have a grid that can be modified incell and in one of my cell, I have an editor that creates a dropdowntree. When i want to select an element of the dropdowntree it trigger the select event but not the change event and doesn't go in the save of my grid.

 

The dojo link will show you the problem

https://dojo.telerik.com/uSULOkUc

 

Please let me know if you have any fix for this.

Thanks.

Veselin Tsvetanov
Telerik team
 answered on 03 Jun 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?