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

Cascading Doesn't Fire When Value = 0

2 Answers 63 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Nick
Top achievements
Rank 1
Nick asked on 22 May 2013, 07:57 PM
I have a couple of dropdowns that are setup to cascade:
01.@(Html.Kendo().DropDownListFor(model => model.FixedMovementType)
02.                      .OptionLabel("* Not Selected")
03.                      .DataTextField("Name")
04.                      .DataValueField("Id")
05.                      .BindTo(Model.FixedMovementTypes))
06.                @Html.ValidationMessageFor(model => model.FixedMovementType, "", new {@class = "alert-error"})
07.                @(Html.Kendo().DropDownListFor(model => model.Location)
08.                    .OptionLabel("* Not Selected")
09.                    .DataTextField("Name")
10.                    .DataValueField("Id")
11.                    .DataSource(source => source.Read(read => read.Action("GetLocationsRead", "FixedMovement").Data("FilterLocation")).ServerFiltering(true))
12.                    .AutoBind(false)
13.                    .CascadeFrom("FixedMovementType"))

Example data for the first dropdown (being cascaded from):
1.{
2.Id = 0,
3.Name = "Employment"
4.},
5.{
6.Id = 1,
7.Name = "Store"
8.}
Everything is working just fine except when Employment is selected in the first dropdown this does not fire cascading.  Is it intended when the value of the dropdown is = 0 that cascading won't fire?  This seems quite silly to me because when there is nothing selected .value() returns an empty string.

2 Answers, 1 is accepted

Sort by
0
Nick
Top achievements
Rank 1
answered on 23 May 2013, 12:42 PM
Thank you Georgi,

If I am understanding you correctly then you are saying that this is an intended feature for cascading to not fire if the selected value is equal to 0?

Thank you,

Nick
0
Georgi Krustev
Telerik team
answered on 23 May 2013, 01:21 PM
Hello Nick,

 
The DropDownList should cascade when its value is 0. The described problem is a bug, which will be addressed in the next internal build of Kendo UI due the end of week. Thank you for drawing our attention to this issue. I updated your Telerik points because of the involvement.

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