Hi Andrew,
Thank you for posting.
As for the DataRow databinding problem, based on my understanding, it is
because ASP.NET databinding (bound a control's certain property to a
datafield of another dataobject) is based on class's "Property", not
field. And when we bind a DataSet or DataTable to a databound control(e.g a
DataGrid or GridView...), the databound control finally get a DataView
object, and the data object bound to each RowItem in the control is not
DataRow, instead it is a DataRowView. The difference between DataRow and
DataRowView is that DataRow does not expose Data fields (columns) through
public property or can not be reflected through PropertyDescriptor... While
the DataRowview class can let the databound control dynamically reflect its
data properties... (e.g through DataBinder.Eval(....)).
Though DataRowView can be used by databound control, I do not recommend
your data access class return this class's instance since it is mainly used
by ADO.NET built-in data components. For your scenario, I'd rather suggest
you create your own custom Account class which expose those data
fields(columns) through public properties, this can help them be correctly
reflected by databound control.
Hope this helps. If there's anything else unclear, please feel free to post
here.
Regards,
Steven Cheng
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)