I have something like this:
<div>
<asp:ListView>
<div>
<asp:ListView>
<div>
<asp:ListView>
</asp:ListView>
</div>
</asp:ListView>
<div>
</asp:ListView>
</div>
Of course the above is just pseudo-code, but basically it's like that. 3-Levels of DataBound ListViews (each connected to an SqlDataSource). All my ListViews fully utilize the control's built-in functionalities, meaning Select/Insert/Update/Delete are all on .aspx (ItemCommand) through the SqlDataSource. I do not have any Code-behind.
What I'm trying to do is make this layered ListView into something like a TreeView using JQuery. My first step is to .show()/.hide() the child ListViews but as expected, when a PostBack happens, the .show()/.hide() states don't persist.
I'm about to attempt using <asp:HiddenField> to be set during OnItemCommand from the ListViews to be used by JQuery during document.ready, but I think it will be a .FindControl() Hell.
Do you have an elegant solution in mind?