This is a migrated thread and some comments may be shown as answers.

CascadeFrom and optionLabel

3 Answers 77 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 11 Jan 2013, 02:02 PM
Consider two comboboxes. Box1 and Box2:
- Box2 is cascading from Box1
- Box1 has an optionLabel

It appears to me that Box1 is populating (or attempting to populate) Box2 when the Box1 optionLabel is selected.

This is erroneous.  When Box1 optionLabel gets selected Box2 should be emptied and deactivated.

3 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 14 Jan 2013, 09:44 AM
Hello Richard,

 
I will suggest you download the latest internal build, which provides many improvements on the cascading functionality. Give it a try and let me know what your findings are.

All the best,
Georgi Krustev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Richard
Top achievements
Rank 1
answered on 14 Jan 2013, 10:10 AM
Hi Georgi:

Would love to try the internal build, but don't have the time this week (mostly due to some customization I needed to make in the data module (I'll post the issue in the data forum - see http://www.kendoui.com/forums/framework/data-source/datasource-transport-read-success---but-not-really.aspx))

After several debug sessions I discovered the cause of my problem is that I had configuration properties indicating the same data field for both text and value.

$("#drop1").kendoDropDownList ({
...
, optionLabel: 'Item...'
, dataTextField : 'item'
, dataValueField: 'item'
...
})

$("#drop2").kendoDropDownList ({
...
, cascadeFrom: 'drop1'
...
})


The text in the drop down at index 0 shows "Item..." (the value of the data text field is computed as d.item)
Since the data value field is also 'item' it will cause the initial internal select to believe filterValue has a value that needs to be utilized in a cascade.

Did some experiments that make clear the dataSource should supply at least two fields, and the DDL should utilize both.

The documentation should be updated to indicate in greater detail the requirements of the field properties and connected dataSource

p.s. The demo page for CDDL has a typo 'Catergories', should be 'Categories'
0
Georgi Krustev
Telerik team
answered on 15 Jan 2013, 02:43 PM
Hello Richard,

 
We will update the documentation to be more clear about the usage of optionLabel option along with cascadeFrom.

The second issue is already addressed.

Regards,
Georgi Krustev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
DropDownList
Asked by
Richard
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Richard
Top achievements
Rank 1
Share this question
or