Keeping collapsed/expanded state of a CollapsiblePanelExtender item after rebinding parent DataGrid in ASP.NET
Posted on 2014-12-17
I have a GridView with a CollapsiblePanelExtender. The AutoCollapse and Collapsed values are currently set to false.
I have a button that essentially adds another row to the table that populates the gridView then rebinds the gridview with the new row reflected.
If I have a row expanded when I press this button, the page posts back and the false collapsed value takes over collapsing all of my rows.
I can flip flop this by setting the collapse values to true.
Either way, my rows are always expanded or collapsed regardless of their state when posting back using this button.
Is there a way for me to start with all of my rows collapsed on the initial page load and keep their collapsed/expanded state on every postback following?