Hi there
Can anyone point me in the right direction with a problem that has so far stumped me? I have a RadTreeView that uses an .ascx User Control as its node template, and which displays data from a hierarchical data source - the data is a hierarchical set of 'comments' submitted by users for a blog post. All this works fine. The issue is, I am trying to work out the best way of dynamically incorporating into a node an editor control which would be displayed ONLY if a new comment needed to be added as a 'reply' to an existing comment. In other words, I'm looking for a way to only display a text area editor in a node if the 'Reply' button is pressed for a particular node. Obviously I could have a RadEditor hidden within each node template, to be shown only as and when the Reply button is pressed. BUT ... this would mean having a RadEditor control for each and every node in the treeview, and I'm pretty sure this would have rather severe performance implications. I have many many nodes, and dread to think how slow it would be to have a RadEditor control instantiated server-side for each and every node.
At the moment I just have a single RadEditor outside the treeview hierarchy, but this is not ideal as it means the reply text area is at a different place on the page to the comment in question to which the reply is being made. Instead I'm looking for a way to do something like the review pages of Amazon, which appear to re-use a single control at different positions in the comment hierarchy dynamically on demand - I haven't really managed to reverse engineer their technique yet, it seems quite complex, but it appears to involve having a single 'pre-rendered' text area/editor hidden on the page, which is then dynamically injected into the tree view at the correct location by client-side Javascript, using a Placeholder that IS already included in the node template they use (I appreciate they may well not be using the RadTreeView control, but it is something similiar).
So my question is, are there any additional RadControls that I should be using in order to reproduce this behaviour, or what would be the recommended technique for dynamically re-using and repositioning a single editor control within the tree view hierarchy as a whole, in a way that would avoid having a RadEditor control instantiated for every single node.
Thanks very much for your advice.
Regards
Can anyone point me in the right direction with a problem that has so far stumped me? I have a RadTreeView that uses an .ascx User Control as its node template, and which displays data from a hierarchical data source - the data is a hierarchical set of 'comments' submitted by users for a blog post. All this works fine. The issue is, I am trying to work out the best way of dynamically incorporating into a node an editor control which would be displayed ONLY if a new comment needed to be added as a 'reply' to an existing comment. In other words, I'm looking for a way to only display a text area editor in a node if the 'Reply' button is pressed for a particular node. Obviously I could have a RadEditor hidden within each node template, to be shown only as and when the Reply button is pressed. BUT ... this would mean having a RadEditor control for each and every node in the treeview, and I'm pretty sure this would have rather severe performance implications. I have many many nodes, and dread to think how slow it would be to have a RadEditor control instantiated server-side for each and every node.
At the moment I just have a single RadEditor outside the treeview hierarchy, but this is not ideal as it means the reply text area is at a different place on the page to the comment in question to which the reply is being made. Instead I'm looking for a way to do something like the review pages of Amazon, which appear to re-use a single control at different positions in the comment hierarchy dynamically on demand - I haven't really managed to reverse engineer their technique yet, it seems quite complex, but it appears to involve having a single 'pre-rendered' text area/editor hidden on the page, which is then dynamically injected into the tree view at the correct location by client-side Javascript, using a Placeholder that IS already included in the node template they use (I appreciate they may well not be using the RadTreeView control, but it is something similiar).
So my question is, are there any additional RadControls that I should be using in order to reproduce this behaviour, or what would be the recommended technique for dynamically re-using and repositioning a single editor control within the tree view hierarchy as a whole, in a way that would avoid having a RadEditor control instantiated for every single node.
Thanks very much for your advice.
Regards