这让我非常沮丧
我有几个层次化的few组合框:
大陆国家
当表单加载一切正常时,当我第一次更改大陆时,国家重新填充正确。但是,如果我第二次更改大陆,我会收到一个错误:
Specified argument was out of the range of valid values.Parameter name: The DataValueField of ValueField was not found in the Columns collection. 有人能告诉我为什么吗?
附言:这是我在Page_Load事件中拥有的全部内容
if (!IsPostBack)
{
this.Load_AreaList();
this.Load_AreasOfInterest();
this.Load_Degrees();
this.Load_GenderList();
this.Load_ParticipationDateModifiers();
this.Load_ProgramCategories(nEventID);
this.Load_YesNoList();
this.Load_ParticipantInformation(nParticipantID);
}此外,这也发生在表单的另一个部分,另一个国家/地区的webcombo应该填充一个州组合框。
发布于 2010-05-01 06:07:34
在许多情况下,当数据库表中的列中没有存储任何值时,该列将返回null。但是,当您使用ASP.NET代码或数据绑定Web控件时,空值可能会带来挑战。例如,如果您尝试将DropDownList控件的SelectedValue绑定到null,则会引发异常。如果不是这样,请更改AppendDataBoundItems属性。AppendDataBoundItems属性允许您在数据绑定发生之前向ListControl对象添加项。数据绑定后,items集合既包含来自数据源的项,也包含以前添加的项。
如果有效的话请告诉我。
S
https://stackoverflow.com/questions/2747569
复制相似问题