且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

下拉列表

更新时间:2022-12-02 11:37:54

嗨 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