Browseable attribute and Infragistics WinGrid
I'm struggling with the databind behaviour of the Infragistics WinGrid. It's possible to manually define a data schema (which I'm doing) and it's also possible to tell the grid when binding that I don't want for the grid to display additional bands or开发者_开发技巧 columns, even if my data source has them.
DisplayLayout.NewBandLoadStyle = Infragistics.Win.UltraWinGrid.NewBandLoadStyle.Hide;
DisplayLayout.NewColumnLoadStyle = Infragistics.Win.UltraWinGrid.NewColumnLoadStyle.Hide;
The problem is that the grid ALWAYS tries to get the value of the property even if it's not in the columns layout. It's possible however use the browseable attribute in the domain object:
[Browsable(false)]
and the grid will ignore the property (it won't try to use the property getter). But I believe this is a lame workaround. Does anyone know an efficient way to instruct the grid only to get the value for the items defined in the layout.
Many thanks
In the DisplayLayout of the grid, there is a MaxBandDepth property. This will limit the number of bands that's shown.
I.e. if you have a heirarchical data source with 2 tables (parent to child relationship) and you set the MaxBandDepth to 1, then only the parent table's information will show.
精彩评论