下拉列表 [英] drop down list

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

问题描述

我有一个下拉列表,其数据为
分配
等待中
成品

现在,当我选择任何值时,我希望将此值分配给网格中存在的其他下拉菜单.

第一个下拉列表位于网格外部...

I am having one drop down list with data as
Assign
Waiting
Finished

now when i select any value i want this value should be assign to other dropdown present in grid.

first drop down is outside grid...

推荐答案

嗨 Tejas,

请执行以下操作:

1.设置AutoPostback = true并创建事件dropdown1_selectedIndexChanged事件

2.将上面的事件写在里面

Hi Tejas,

Do the following:

1. set the AutoPostback=true and create the event dropdown1_selectedIndexChanged event

2. write the inside the above event

for(int i=0;i<gridview1.rows.count;i++)>
{
//assumed your dropdown would be exists in second position or column
//Dropdown2 is the id of dropdown which is inside the gridview item template
DropdownList drp2 = (DropdownList) gridview1.Rows[i][2].findControl("Dropdown2");
drp2.selectedItem.Text = Dropdown21.selectedItem.Text;
}



如有任何疑问,请让我知道.
如果对您有帮助,请提供投票.
谢谢,
Imdadhusen



Please do let me know, if you have any doubt.
Please provide Vote if this would be helpful to you.
Thanks,
Imdadhusen


嗨 Tejas,

请确认以下内容:

1.您有一个位于网格外部的下拉菜单,其中包含分配,等待,完成选项?

2.从下拉菜单中选择任何选项时.您需要相应地更改网格内下拉菜单的值吗?

请确认我的想法.


谢谢,
Imdadhusen
Hi Tejas,

Please confirm following:

1. You have one drop down which is outside of the grid and it''s contains Assign, Waiting, Finished options?

2. when selecting any of the option from drop down. you need to change the value of drop down inside the grid accordingly?

Please confirm my thoughts.


Thanks,
Imdadhusen


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

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