本文介绍了如何选择dropDown的特定属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
ddlCountry已经绑定了。现在在gridview selectedIndex已更改事件我想设置下拉值。我怎么能这样做?
ddlCountry。(这里需要哪个属性??)= gvCountry.SelectRow.Cells [1] .text;
ddlCountry.DataValueField = CountryId
ddlCountry.DataTextFiled = CountryName;
ddlCountry.DataSource = objCountry.Select();
ddlCountry.DataBind();
解决方案
ddlCountry is already bind. now on gridview selectedIndex changed event i want to set the Value of dropdown. how can i do this??
ddlCountry.(which property need here??) = gvCountry.SelectRow.Cells[1].text;
ddlCountry.DataValueField= "CountryId" ddlCountry.DataTextFiled= "CountryName"; ddlCountry.DataSource= objCountry.Select(); ddlCountry.DataBind();
解决方案
这篇关于如何选择dropDown的特定属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!