且构网

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

我在VB.NET中从gridview中删除一行时遇到问题

更新时间:2023-12-06 13:43:10

错误清楚地告诉你出了什么问题以及该怎么做修复问题。



您在设计时定义了数据绑定(即通过设计模式下IDE中的属性窗口)



您还在BindData函数中执行数据绑定。



只选择一种方法,不能同时选择两种方法。



我建议您在选择DataGrid时进入属性窗口并删除DataSourceID(如果设置则删除DataMember和DataKeyNames)。



由于您没有解释编辑更新和取消的问题,我们无法帮助您。
The error clearly tells you what is wrong and what to do to fix the problem.

You have databinding defined at Design time (i.e. via the Properties window in the IDE in Design mode)

You are also performing databinding in the function BindData.

Choose one method only, you cannot do both.

I suggest you go to the Properties window when the DataGrid is selected and remove the DataSourceID (and DataMember and DataKeyNames if set).

As you haven't explained what the problem is with edit update and cancel we can't help you there.