A friend of mine passed along an interesting problem regarding DataGrids. They had the need to hide certain columns and then dynamically load the data. When doing this as expected, such as dataGridName.dataProvider = yourArrayName, the hidden columns would not stay hidden. The workaround to this issue is to track the visibility of each DataGridColumn, set the column to visible, and then override it with the visibility status we stored.
View the example here and download the code here.
Definately not optimal, but it works... ;-)
Thanks Michael, I've noticed the same problem and have been looking for a work-around (and some understanding of why this is the case, seems like a defect to me). I'll try your solution.
ReplyDeletewell, even after downloading the hotfix, the problem was still there, so I found a solution ...
ReplyDeletejust set width="0" for the column you don't want to be visible ...
but if the columns are resizable, setting the width to 0 will not help because if the user resized the column, the hidden column would appear
ReplyDelete