DataSource 是dateset,自己写的代码绑定.可是当按下编辑或新建 却不能进入相应的状态,不知为什么.
protected void fv_V_商品信息_ModeChanging(object sender, FormViewModeEventArgs e)
{
switch (e.NewMode)
{
case FormViewMode.Edit:
// Hide the pager row and clear the Label control
// when transitioning to edit mode.
fv_V_商品信息.AllowPaging = false;
//MessageLabel.Text = "";
break;
case FormViewMode.ReadOnly:
// Display the pager row and confirmation message
// when transitioning to edit mode.
fv_V_商品信息.AllowPaging = true;
if (e.CancelingEdit)
{
// MessageLabel.Text = "Update canceled.";
}
else
{
//MessageLabel.Text = "Update completed.";
}
break;
case FormViewMode.Insert:
// Cancel the mode change if the FormView
// control attempts to transition to insert
// mode.
e.Cancel = true;
break;
default:
//MessageLabel.Text = "Unsupported mode.";
break;
}
}
protected void fv_V_商品信息_ModeChanging(object sender, FormViewModeEventArgs e)
{
switch (e.NewMode)
{
case FormViewMode.Edit:
// Hide the pager row and clear the Label control
// when transitioning to edit mode.
fv_V_商品信息.AllowPaging = false;
//MessageLabel.Text = "";
break;
case FormViewMode.ReadOnly:
// Display the pager row and confirmation message
// when transitioning to edit mode.
fv_V_商品信息.AllowPaging = true;
if (e.CancelingEdit)
{
// MessageLabel.Text = "Update canceled.";
}
else
{
//MessageLabel.Text = "Update completed.";
}
break;
case FormViewMode.Insert:
// Cancel the mode change if the FormView
// control attempts to transition to insert
// mode.
e.Cancel = true;
break;
default:
//MessageLabel.Text = "Unsupported mode.";
break;
}
}
解决方案 »
- 我想知道那个 很久很久以前发生的 js 与 WebService 的故事
- 用FileUpLoad空间上传文件,在上传完毕后如何释放内存
- asp.net(vb) 导出图片到excel
- client.DownloadData() 404错误
- 100+100分,求切实可行的页面可视化继承。
- csdn的站内短信提示是怎么实现的?
- Web在线编辑器WebHtmlEditor 1.6 Release Support .NET Framework v1.1 如何定制工具栏
- 【求助】关于自己建的asp.net网站发布问题
- 怎样用farpoint spread for web form控件连接SQL Server??急!!!!!!!
- 欢迎大家光临C#资源网---csource.yeah.net
- ASP.NET生成DLL问题
- WebService 更新时出错问题 !急急急!!
{
switch (e.NewMode)
{
case FormViewMode.Edit:
// Hide the pager row and clear the Label control
// when transitioning to edit mode.
fv_V_商品信息.AllowPaging = false;
//MessageLabel.Text = "";
break;
已经有验证可以到达这边了.
FormView1.ChangeMode(FormViewMode.Edit);
把模式改成编辑模式