本文介绍了网格视图更新问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个下拉列表,当用户选择其他下拉列表时,它会打开一个面板文本框.现在,当用户在文本框中输入文本时
它可以成功保存,但问题是用户尝试对其进行编辑时会显示如下消息.
-SelectedValue无效,因为它不存在于项目列表中.
参数名称:值
代码:
Hi,
I have one dropdownlist in that when user select others its opens a panel textbox. now when user enter text in textbox
it saves successfully but the problem is when user try to edit it show s the message like this.
-- SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value
code:
btncancel.Visible = true;
if (ddlFeedtype.SelectedItem.Text == "Others")
{
txtOtherfeed.Text = dtfillplantrecorddet.Rows[0]["feedtype"].ToString();
}
else
{
ddlFeedtype.SelectedValue = dtfillplantrecorddet.Rows[0]["feedtype"].ToString();
}
// ddlFeedtype.SelectedValue = dtfillplantrecorddet.Rows[0]["feedtype"].ToString();
推荐答案
这篇关于网格视图更新问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!