Hi,
Why does my DataGrid do not accept DataBind?
The error is:Code:.... string sCnx = "server=..; uid=..; pwd=..; database=.."; SqlConnection cnx = new System.Data.SqlClient.SqlConnection(sCnx); cnx.Open(); SqlCommand cmd = new System.Data.SqlClient.SqlCommand(); cmd.Connection = cnx; cmd.CommandText = "GetInfo"; cmd.CommandType = CommandType.StoredProcedure; SqlDataAdapter dataAdapter = new SqlDataAdapter(); dataAdapter.SelectCommand = cmd; DataSet dataSet = new DataSet(); dataAdapter.Fill(dataSet); dgTest.DataSource = procs.GetProc(); dgTest.DataBind();
'System.Windows.Forms.DataGrid' does not contain a definition for 'DataBind'
How can I fill the DataGrid with the dataSet?




Reply With Quote