Hi
I currently have a 2 level tree view that displays departments and then assets within those departments. To do this I am using a sql stored procedure to prepare the data. See the attatched file to see the output of this stored procedure. I am then using the following c# code to bind the tree view.
My Question is, how do I go about adding another level of data to the tree. I want to now display SITES, that have Departments that have Assets. I.E I want to add a grand parent. what would be the correct schema for my stored procedure output to achieve this.
Thanks
Dave
I currently have a 2 level tree view that displays departments and then assets within those departments. To do this I am using a sql stored procedure to prepare the data. See the attatched file to see the output of this stored procedure. I am then using the following c# code to bind the tree view.
DataTable assets = new DataTable(); using (SqlConnection connection = new SqlConnection(ConnectionString)) { using (SqlCommand command = new SqlCommand("GetAssetHierarchyByUserId", connection)) { command.Parameters.Add(new SqlParameter("UserId", UserId)); command.CommandType = CommandType.StoredProcedure; SqlDataAdapter adapter = new SqlDataAdapter(command); connection.Open(); try { adapter.Fill(assets); } finally { connection.Close(); } }My Question is, how do I go about adding another level of data to the tree. I want to now display SITES, that have Departments that have Assets. I.E I want to add a grand parent. what would be the correct schema for my stored procedure output to achieve this.
Thanks
Dave
