البته و صد البته و بنده هم این را امتحان کرده بودم برای همین روال را دوباره اجرا کردم تا به شما هم نشان دهم:
void bindToUser()
{
string strCon = ConfigurationSettings.AppSettings["ConnStr"	 3;;
SqlConnection wg = new SqlConnection(strCon);
SqlDataAdapter dtAdap = new
SqlDataAdapter("select username,email,Roles from tblUser",wg);
DataSet dsetSales = new DataSet();
dtAdap.Fill(dsetSales, "tblUser");
DataGrid1.DataSource = dsetSales.Tables["tblUser"].DefaultView;
DataGrid1.DataBind();
}
Server Error in '/edu/nahie' Application.
--------------------------------------------------------------------------------
DataBinder.Eval: 'System.Data.DataRowView' does not contain a property with the name row.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: DataBinder.Eval: 'System.Data.DataRowView' does not contain a property with the name row.
Source Error:
Line 80:
Line 81: DataGrid1.DataSource = dsetSales.Tables["tblUser"].DefaultView;
Line 82: DataGrid1.DataBind();
Line 83:
Line 84: }