Hello,
I have a grid with Grouping enabled that is populated programatically, and during the ItemDataBound event, items that do not meet a certain criteria are set to Visible = False.
When the grid is rendered, there may be group headers that do not contain any items, if none of the items satisfied my criteria, so in those cases I need those groups to be hidden or removed. I only want the user to see and expand/collapse group headers that actually contain items within.
How can I do this?
Should I remove the items during ItemDataBound instead of setting them to Visible = False, so that no Group Header is generated? If so, what is the best way to do this?
Thanks in advance.
I have a grid with Grouping enabled that is populated programatically, and during the ItemDataBound event, items that do not meet a certain criteria are set to Visible = False.
When the grid is rendered, there may be group headers that do not contain any items, if none of the items satisfied my criteria, so in those cases I need those groups to be hidden or removed. I only want the user to see and expand/collapse group headers that actually contain items within.
How can I do this?
Should I remove the items during ItemDataBound instead of setting them to Visible = False, so that no Group Header is generated? If so, what is the best way to do this?
Thanks in advance.