I have a grid that I'm binding different bits of data to it depending on what a user selects from a drop down list. The grid is a simple hierarchy grid (although sometimes it only has one level) with a check box column and a bound column. When the grid doesn't have hierarchical data, I want to hide the ExpandCollapsColumn which I'm doing in the code behind with this line every time a user changes their drop down selection:
grdList.MasterTableView.ExpandCollapseColumn.Display = False
However, when I page in the grid, the ExpandCollapseColumn comes back when it shouldn't. Sometimes I'm choosing to make the column appear if the data being bound to the grid supports it. So I don't want it to be permanently hidden. Is there a reason that the grid doesn't want to stay hidden after seeing Display = False? It seems like a bug, but I suppose there could be a reason for it.
grdList.MasterTableView.ExpandCollapseColumn.Display = False
However, when I page in the grid, the ExpandCollapseColumn comes back when it shouldn't. Sometimes I'm choosing to make the column appear if the data being bound to the grid supports it. So I don't want it to be permanently hidden. Is there a reason that the grid doesn't want to stay hidden after seeing Display = False? It seems like a bug, but I suppose there could be a reason for it.