r0k3t
Jul 6th, 2007, 08:10 AM
Hi there,
So I am stuck using some objects that someone else bought off the web - don't blame me I am not the boss... :) At any rate I am trying to make this slide menu thing work. I finally posted to the companies website and they told me I couldn't use SqlDataSource, they said it is not a IhirearchicalDataSource. Now I went out and researched this and I seem to understand somewhat, at least I understand what the mean. What I don't understand is how should I be implementing this? Should I not use the sqlClient classes?
I guess the big question how do I change the code below to make that work then? Have a quick look!
Connection = new SqlConnection(ConfigurationManager.ConnectionStrings["ecommerceConnectionString"].ConnectionString);
Connection.Open();
Command selectAllIndustries = new SqlCommand("GetAllIndustires", Connection);
selectAllIndustries.CommandType = CommandType.StoredProcedure;
DataSet ds = new DataSet();
SqlDataAdapter da = new SqlDataAdapter(selectAllIndustries);
da.Fill(ds);
SlideMenu1.DataSource = ds.Tables[0];
SlideMenu1.DataFields = "Name";
SlideMenu1.DataBind();
From the website of the objects.
"Actually your code is correct. What I was saying is for your instance, SqlDataSource won't work for SlideMenu. Which means you can not assign a SqlDataSource as SlideMenu's datasource. The reason is that SqlDataSource is not an IhirearchicalDataSource, which means our slideMenu only can work with datasource which inherits IHierarchicalDataSource interface."
So what? Do I use an OleDb data source? They just doesn't seem to make any sense...
Thanks
So I am stuck using some objects that someone else bought off the web - don't blame me I am not the boss... :) At any rate I am trying to make this slide menu thing work. I finally posted to the companies website and they told me I couldn't use SqlDataSource, they said it is not a IhirearchicalDataSource. Now I went out and researched this and I seem to understand somewhat, at least I understand what the mean. What I don't understand is how should I be implementing this? Should I not use the sqlClient classes?
I guess the big question how do I change the code below to make that work then? Have a quick look!
Connection = new SqlConnection(ConfigurationManager.ConnectionStrings["ecommerceConnectionString"].ConnectionString);
Connection.Open();
Command selectAllIndustries = new SqlCommand("GetAllIndustires", Connection);
selectAllIndustries.CommandType = CommandType.StoredProcedure;
DataSet ds = new DataSet();
SqlDataAdapter da = new SqlDataAdapter(selectAllIndustries);
da.Fill(ds);
SlideMenu1.DataSource = ds.Tables[0];
SlideMenu1.DataFields = "Name";
SlideMenu1.DataBind();
From the website of the objects.
"Actually your code is correct. What I was saying is for your instance, SqlDataSource won't work for SlideMenu. Which means you can not assign a SqlDataSource as SlideMenu's datasource. The reason is that SqlDataSource is not an IhirearchicalDataSource, which means our slideMenu only can work with datasource which inherits IHierarchicalDataSource interface."
So what? Do I use an OleDb data source? They just doesn't seem to make any sense...
Thanks