Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
Programatically reset relations in WebHierarchicalDataSource

I have a WebHierarchicalDataSource created and set relations visually on aspx page.

I need to filter the undelying dat ato display in the Ultrawebtree. I can change the SqlDataSource.SelectCommand for both data sources (just two levels in the tree) and it filters fine. The only problem is that each parent node appears as many times as there is a max och child nodes. My guess is that the Relationship in WebHierarchicalDataSource  needs to be reset.

What is the proper syntax to do that? Or is it a different problem?

Here is the snip of the code I am using:



SqlDataSource2.SelectCommand =


"SELECT Profile, ProjectName .....



SqlDataSource1.SelectCommand = "SELECT tClients.ClientID, tClients.ClientName FROM ...