错误:A field or property with the name 'XXX' was not found on the selected data source 解决
来源:互联网 发布:淘宝客服打电话说退款 编辑:程序博客网 时间:2024/05/22 02:06
有时候, 我绑定一个datasource到grid,会出现以下错误问题:
A field or property with the name 'To' was not found on the selected data source
原因:
datasource的item对象中,没有property
比如:
public class Email
{
public string From = "";
public string To = "";
public string Subject = "";
public string Body = "";
}
这是不可以的,
解决方案:
应该改成这样!
public class Email
{
private string _from = "";
private string _to = "";
private string _subject = "";
private string _body = "";
public string To
{
get { return _to; }
set { _to = value; }
}
public string From
{
get { return _from; }
set { _from = value; }
}
public string Subject
{
get { return _subject; }
set { _subject = value; }
}
public string Body
{
get { return _body; }
set { _body = value; }
}
}
- 错误:A field or property with the name 'XXX' was not found on the selected data source 解决
- 错误:The superclass "javax.servlet.xxx" was not found on the Java Build Path
- 解决tomcat启动出现in production environments was not found on the java.library.path:xxx
- The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path错误解决
- A file with the correct name was found in this directory, but it is not the correct one.
- 错误:HttpServlet was not found on the Java
- 错误:HttpServlet was not found on the Java
- 错误:HttpServlet was not found on the Java
- 错误:HttpServlet was not found on the Java
- 错误:HttpServlet was not found on the Java
- HttpServlet was not found on the Java 错误的解决办法
- 错误:HttpServlet was not found on the Java
- 错误:HttpServlet was not found on the Java
- 错误:HttpServlet was not found on the Java
- 错误:HttpServlet was not found on the Java
- 错误:HttpServlet was not found on the Java
- 错误:HttpServlet was not found on the Java
- 错误:HttpServlet was not found on the Java
- Spring中Bean的作用域singleton, prototype
- mysql explain使用方法
- servlet 页面跳转
- C++ 虚函数表解析
- java面试(8)
- 错误:A field or property with the name 'XXX' was not found on the selected data source 解决
- linux 启动流程详解
- C#WinForm开发之在ComboBox、ListBox中加载键值对
- 诡异的程序_1【程序的效率问题】
- Java 实现文件的打开操作
- C++ 对象的内存布局(上)
- 网页设计者值得去的地方!
- 数据泵导入的参数EXCLUDE有一个问题!
- word中鼠标没有反应,可以动但是点哪都没反应