简体   繁体   English

绑定特定的嵌套数据列表

[英]Bind Specific Nested Datalist

I am using nested Datalist. 我正在使用嵌套的数据列表。 Now, I want to bind specific inside datalist based on dropdown value selection. 现在,我想基于下拉值选择绑定特定的内部数据列表。 I am able to bind all inside datalist but not only one specific. 我能够绑定所有内部数据列表,但不仅限于一个特定的列表。

For ie, 因为

Main and Nested Datalist is as below : 主要和嵌套数据列表如下:

.NET <-main datalist .NET <-主数据列表
C# <-nested datalist C#<嵌套数据列表
vb vb

Java 爪哇
1 1个
2 2

Now, .NET and Java both contains dropdown. 现在,.NET和Java都包含下拉列表。 If user select value c# from .NET dropdown then I want to bind only nested datalist of .NET, means only display c# or say based on dropdown condition. 如果用户从.NET下拉列表中选择值c#,那么我只想绑定.NET的嵌套数据列表,则意味着仅显示c#或根据下拉条件说。 And if now, user select 1 from Java then it show only 1 but .NET is showing c# only which must not be changed untill user filter .NET dropdown. 并且如果现在,用户从Java中选择1,则它仅显示1,但是.NET仅显示c#,除非用户过滤.NET下拉列表,否则不得更改c#。

Please help me solve the problem. 请帮我解决问题。

If DropDown is in Main DataList then dropdown even can be catched in the "DataList1_ItemCommand" event and in this even check the command name and argument, find the nested datalist with findcontrol method of main datalist. 如果DropDown在Main DataList中,则甚至可以在“ DataList1_ItemCommand”事件中捕获到dropdown,甚至在检查命令名和参数时,也可以使用main datalist的findcontrol方法找到嵌套的数据列表。 Bind the nested DataList according to condition. 根据条件绑定嵌套的DataList。

1) MainDataList_ItemCommand 1)MainDataList_ItemCommand
2) Check the command name and emphasized textargument 2)检查命令名称和强调的文字参数
3) Find the nested Datalist 3)找到嵌套的数据列表
4) Perform filteration on the basis of selected value of dropdown 4)根据选择的下拉值执行过滤
5) Bind the nested Datalist. 5)绑定嵌套的数据列表。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM