在客户端设置CascadingDropDown的值 [英] Set CascadingDropDown's values on client side
问题描述
大家好,我有一个关于级联中的3个DropDownList的问题(与3个CascadingDropDown相关联。)
< asp:DropDownList ID = List_1 runat = server AppendDataBoundItems = true >
< / asp:DropDownList >
< cc1:CascadingDropDown
ID = CDD_1
runat = server
类别 = Costruttore
PromptText = Seleziona il Costruttore ......
ServiceMethod = GetCostruttoreAntenna
ServicePath < span class =code-keyword> = 〜/ webServices / wsAjax.asmx
TargetControlID = Get_Costruttore
LoadingText = Caricamento costruttori ... / < span class =code-keyword>>
< asp :DropDownList ID = List_2 runat = server AppendDataBoundItems = true >
< / asp:DropDownList >
< cc1:CascadingDropDown
< span class =code-attribute> ID = CDD_2
runat = server < span class =code-attribute>
类别 = Modello
PromptText = Seleziona il Modello ...
ServiceMethod = GetModelloAntenna
ServicePath = 〜/ webServices / wsAjax.asmx
TargetControlID < span class =code-keyword> = List_2
< span class =code-attribute>
ParentControlID = List_1
LoadingText = Caricamento modelli。 .. / >
< asp: DropDownList ID = List_3 runat = server AppendDataBoundItems = true >
< / asp:DropDownList >
< cc1:CascadingDropDown
ID = CDD_3
runat = server
类别 = 模式
PromptText = Seleziona il Pattern ...
ServiceMethod = GetPattern
ServicePath = 〜/ webServices / wsAjax.asmx
TargetControlID = List_3
ParentControlID = List_2
LoadingText = Caricamento pattern ... / >
Everithing在服务器端工作正常,但我需要在客户端设置DropDownList的初始值。
$( #List_1)。val(Value_1 );
$( #List_1)。change();
$( #List_2)。val(Value_2);
$( #List_2)。change();
$( #List_3)。val(Value_3);
$( #List_3)。change();
根据这些说明,我只能设置第一个DropDownList的值,而不是其他2,因此保持为空并禁用。
是有可能(用Javascript)截取DropDownList完成加载的事件来设置初始值并触发DropDownList的下一个事件吗?
TIA。
Alder
( #List_1 )。val(Value_1);
( #List_1 )。change();
( #List_2 跨度>)VAL(_2);
Hi all, I have a problem about 3 DropDownList in cascade (with 3 CascadingDropDown associated).
<asp:DropDownList ID="List_1" runat="server" AppendDataBoundItems="true">
</asp:DropDownList>
<cc1:CascadingDropDown
ID="CDD_1"
runat="server"
Category="Costruttore"
PromptText="Seleziona il Costruttore..."
ServiceMethod="GetCostruttoreAntenna"
ServicePath="~/webServices/wsAjax.asmx"
TargetControlID="Get_Costruttore"
LoadingText="Caricamento costruttori..."/>
<asp:DropDownList ID="List_2" runat="server" AppendDataBoundItems="true">
</asp:DropDownList>
<cc1:CascadingDropDown
ID="CDD_2"
runat="server"
Category="Modello"
PromptText="Seleziona il Modello..."
ServiceMethod="GetModelloAntenna"
ServicePath="~/webServices/wsAjax.asmx"
TargetControlID="List_2"
ParentControlID="List_1"
LoadingText="Caricamento modelli..." />
<asp:DropDownList ID="List_3" runat="server" AppendDataBoundItems="true">
</asp:DropDownList>
<cc1:CascadingDropDown
ID="CDD_3"
runat="server"
Category="Pattern"
PromptText="Seleziona il Pattern..."
ServiceMethod="GetPattern"
ServicePath="~/webServices/wsAjax.asmx"
TargetControlID="List_3"
ParentControlID="List_2"
LoadingText="Caricamento pattern..." />
Everithing works fine on server side but I need to set DropDownList's initial values on client side.
$("#List_1").val(Value_1);
$("#List_1").change();
$("#List_2").val(Value_2);
$("#List_2").change();
$("#List_3").val(Value_3);
$("#List_3").change();
With these instructions I can only set the first DropDownList's value, not the other 2, which therefore remain empty and disabled.
Is it possible (with Javascript) to intercept the DropDownList completed loading's event to set the initial value and trigger the next event of the DropDownList?
TIA.
Alder
("#List_1").val(Value_1);
("#List_1").change();
("#List_2").val(Value_2);
这篇关于在客户端设置CascadingDropDown的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!