SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My scenario is as follows:

  • I have a dataview wp which currently displays list items (from ECT).
  • In the DataView wp I filter the data according to a parameter passed in from another wp.

The current list data looks like this:

ID, ParentID, Name        Comments
1   Null      Test        blah
2   1         Test_1      clah
3   1         Test_2      dlah
4   2         Test_1_1    plah
5   4         Test_1_1_1  poo

Currently, the list in the view is filtered as below:


What I hope to achieve is that, if an ID of say 1, is passed to the dataview, then it will show comments from all the children also.

Since it does not look like its possible to do any sort of complex data manipulation within the xsl, I thought I'd pick your brains to see if there is any other viable solution.



share|improve this question
Couldn't you just change the internal binding to something like /rsQueryResponse/Row/Rows[@ID=$ParamValue or @ParentID=$ParamValue]? – Eric Alexander Dec 14 '12 at 16:33
Well that wouldn't work for a hierarchy with more than one level. – Perplexed Dec 14 '12 at 16:42
Misinterpreted the data. It will need some custom xslt to achieve. You'd need to pass the parameter through a template to get the parent, then keep passing it through another template to build child and grandchildren nodes – Eric Alexander Dec 14 '12 at 16:52
How do I query the same data from another template - do I just pass the rows - could you possibly provide a small code sample. Thanks! – Perplexed Dec 14 '12 at 16:56
up vote 0 down vote accepted

Found that the better way to do this was to do the hierarchy grouping in SQL and then use a Business Data List to display the data with a custom xsl for formatting. The ECT is set up with stored procedures. Thanks!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.