(WinForm/.net) Databind List Of Classes To A DataGridView. But Not Show Certain Public Properties
Posted
by Pyronaut
on Stack Overflow
See other posts from Stack Overflow
or by Pyronaut
Published on 2010-03-12T23:43:27Z
Indexed on
2010/03/12
23:47 UTC
Read the original article
Hit count: 158
I'm not even sure if i'm doing this correctly. But basically I have a list of objects that are built out of a class. From there, I am binding the list to a datagrid view that is on a Windows Form (C#)
From there, it shows all the public properties of the object, in the datagrid view. However there is some properties that i still need accessible from other parts of my application, but aren't really required to be visible in the DataGridView.
So is there an attribute or something similar that I can write above the property to exclude it from being shown.
P.S. Im binding at runtime. So i cannot edit the columns via the designer.
P.P.S. Please no answers of just making public variables (Although if that is the only way, let me know :)).
© Stack Overflow or respective owner