I haven't been able to find docs on how to use a bindable attribute to control bindability of properties to grid columns. I tried the usual .NET [Bindable(false)] and the property still bound. Can you point me to an example or doc on how to do this with the WinGrid?
Thanks!
Hi,
Bindable is not the right attribute for this. Bindable, as far as I know, has to do with simple binding. It should not have any effect on the grid.
There may be an attribute you can put on a property that will cause that property not to be returned by the DotNet binding model, but if so, I don't know what it is. The only way I know of to do this is to implement ITypedList and override GetProperties to return only the ones you want.
If you are only concerned with the grid, then I beleive the grid will hide columns if the Browsable attribute is set to false on the property.
[Browseable(false)] sounds like what I need, thanks.
Which namespace would that be in?
Edit: Duh, that'll be "Browsable", not "Browseable" :).
Mmmm... this works for removing the property from being part of the DataSource.
Is there anything similar that could propogate through to the WinGrid, but only hide the column? Just... other things on the form / grid may be dependant upon the columns I want hiding, like the ID's, which I would always want to be hidden.
Nope, I don't think there are any other attributes. You will probably have to implement ITypedList on your data source.
Ok, cheers :).