Hi,
Simple error, can't find any other posts on it. I have a class which grabs data from a table using a stored proc, then populates a simple class and I'm using the class as the datasource for a datagrid in my user control. I've done the same thing with other classes with no trouble and I can't figure out what the difference is with this one. Here's the error code:
----------
A field or property with the name 'Count' was not found on the selected datasource.
at System.Web.UI.WebControls.BoundColumn.OnDataBindColumn(Object sender, EventArgs e) at System.Web.UI.Control.OnDataBinding(EventArgs e) at System.Web.UI.Control.DataBind() at System.Web.UI.Control.DataBind() at System.Web.UI.WebControls.DataGrid.CreateItem(Int32 itemIndex, Int32 dataSourceIndex, ListItemType itemType, Boolean dataBind, Object dataItem, DataGridColumn[] columns, TableRowCollection rows, PagedDataSource pagedDataSource) at System.Web.UI.WebControls.DataGrid.CreateControlHierarchy(Boolean useDataSource) at System.Web.UI.WebControls.BaseDataList.OnDataBinding(EventArgs e) at System.Web.UI.WebControls.BaseDataList.DataBind() at ProjectMgr.PickNote.DataBind() in c:\inetpub\ 28 at ProjectMgr.AddTask.Page_Load(Object sender, EventArgs e) in c:\inetpub\
-----------
"Count", of course, is not in my SELECT statement in the stored proc, or in the class that holds the data. This only happens if I have "Autogenerate Columns" turned on.
Thanks in advance,
Paul
Simple error, can't find any other posts on it. I have a class which grabs data from a table using a stored proc, then populates a simple class and I'm using the class as the datasource for a datagrid in my user control. I've done the same thing with other classes with no trouble and I can't figure out what the difference is with this one. Here's the error code:
----------
A field or property with the name 'Count' was not found on the selected datasource.
at System.Web.UI.WebControls.BoundColumn.OnDataBindColumn(Object sender, EventArgs e) at System.Web.UI.Control.OnDataBinding(EventArgs e) at System.Web.UI.Control.DataBind() at System.Web.UI.Control.DataBind() at System.Web.UI.WebControls.DataGrid.CreateItem(Int32 itemIndex, Int32 dataSourceIndex, ListItemType itemType, Boolean dataBind, Object dataItem, DataGridColumn[] columns, TableRowCollection rows, PagedDataSource pagedDataSource) at System.Web.UI.WebControls.DataGrid.CreateControlHierarchy(Boolean useDataSource) at System.Web.UI.WebControls.BaseDataList.OnDataBinding(EventArgs e) at System.Web.UI.WebControls.BaseDataList.DataBind() at ProjectMgr.PickNote.DataBind() in c:\inetpub\ 28 at ProjectMgr.AddTask.Page_Load(Object sender, EventArgs e) in c:\inetpub\
-----------
"Count", of course, is not in my SELECT statement in the stored proc, or in the class that holds the data. This only happens if I have "Autogenerate Columns" turned on.
Thanks in advance,
Paul