1个gridview中的3个下拉列表控件 [英] 3 dropdownlist controls in 1 gridview

查看:83
本文介绍了1个gridview中的3个下拉列表控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我在一个网格视图中有3个下拉列表,我的目标是
->通过在第一个下拉列表控件中选择一项,
我应该在第二个下拉列表中获取相关项,并且当从第二个下拉列表中选择一项时,我必须在第三个下拉列表中获取相关项.
(例如:我选择第一部ddl中的电影,那么我必须获得喜剧,动作.... etc
当我从第二个ddl中选择喜剧时,我必须在第三个ddl中获得喜剧电影的列表)
所有这些控件都在网格视图中.


请在这方面帮助我.

在此先感谢.

Hi All,

I have 3 dropdownlists in one grid view , my aim is
-> by selecting one item in 1st dropdownlist control ,
I should get related items in 2nd dropdownlist ,and when selecting one item from the 2nd dropdown I must get the related things in 3rd dropdown List.
(for ex: i select movies in 1st ddl, then i must get comedy,action....etc
when i select the comedy from 2nd ddl i must get the list of Comedy movies in 3rd ddl)
all these controls are there in grid view.


Please help me in this regard.

Thanks in Advance.

推荐答案

非常简单

< templatefiled>
< asp:dropdownlist id ="ddl1" runat ="server" autopostback ="true" onselectedindexchanged ="ddl1_onselectedindexchanged">
......

在后面的代码中
受保护的void ddl1_onselectedindexchanged(object sender,EvetArgs e)
{
//此处是ddl2代码.
}

与上面的代码相同,您可以不填充任何下拉列表,这些都在gridview中.
希望对您有帮助.如果您有任何疑问,请问我.
it''s very easy

<templatefiled>
<asp:dropdownlist id="ddl1" runat="server" autopostback="true" onselectedindexchanged="ddl1_onselectedindexchanged">
......

in code behind
protected void ddl1_onselectedindexchanged(object sender,EvetArgs e)
{
// ddl2 code here.
}

same as above code you can fill no of dropdown and these are all in the gridview .
i hope it should helps you.if you have any doubt ask me,


是什么意思. 过滤"

如果我是正确的,则应使用与Gridview连接或相关的数据源.

例如:

在dropdown1中:
过滤第一列

在dropdown2中:
筛选第二列

在dropdown3中:
过滤第三列.

试试这个链接:
数据集类


希望对您有帮助.
祝你好运. :)


-chaosgray-
do you mean. "filtering"

if i''m correct, you should use the a datasource that are connected or relation to the gridview.

for example:

in dropdown1:
filter the first column

in dropdown2:
filter the second column

in dropdown3:
filter the third column.

try this link:
data set class


hope it helps.
goodluck. :)


-chaosgray-


使用数据源向导将下拉列表2和3的数据源使用到选定值.
Use Datasource for the dropdownlist 2 and 3 to the selected value using the datasource wizard.


这篇关于1个gridview中的3个下拉列表控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆