Databind List Of Objects To A WinForms DataGridView, But Not Show Certain Public Properties
- by Pyronaut
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 :)).