|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Dataset displays in datagrid at runtime but designer doesn't see any datasourcesI am having a problem that I can't figure out. I have a stored procedure that gets a catalog of data from the server. This is the code I have typed: SqlConnection conn = new SqlConnection(); conn.ConnectionString = System.Configuration.ConfigurationSettings.AppSettings["connString"]; conn.Open(); SqlCommand cmd = new SqlCommand("sp_productCatalogGet", conn); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add(new SqlParameter("@uid",SqlDbType.BigInt,8,"uid")); cmd.Parameters[0].Value=strUid; SqlDataAdapter da = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); da.Fill(ds); dgCatalog.DataSource = ds; dgCatalog.DataBind(); When I run the solution, the web page displays all the data correctly from the Stored Procedure in the Data Grid. However, I want to use the Property Builder to make the data grid look nice, etc. The problem, though, is the Property Builder in Design View doesn;t see the data sources. The datagrid id is dgCatalog. Not sure if it matters but I am using WebForms. I have also tried using the reader but the same problem occurs. Is there anything special I have to do to get the Designer to see myh dataset (ds) Thanks in advance! John |
|||||||||||||||||||||||