thielj / MetroFramework

Metro UI of Windows 8 for .NET Windows Forms applications
http://thielj.github.io/MetroFramework
Other
396 stars 225 forks source link

MetroGrid Control showing class properties that are not explicitly declared as Grid Columns #121

Open SkyEngine-OSP opened 4 years ago

SkyEngine-OSP commented 4 years ago

I explicitly defined what columns my MetroGrid should show, i then disabled the .AutoGenerateColumns on Load Event, then passed a .DataSource value to the Grid via a method i defined that triggers on button click. However, i noticed that when i assign the IEnumerable to the MetroGrid's .DataSource property, it shows the Class Property that is not defined as a column.

see below image refs:

Class Design (https://imgur.com/ZObtftR) Explicitly Defined Grid Columns (https://imgur.com/9hSHWFd) Grid Columns Displayed on Runtime (https://imgur.com/EMNfb6Y)

i'm using MetroFramework 1.4.0.0 by the way

Edit: a quick workaround i do with it is, i define that extra column that should not appear, then set its Visibility to Hidden.