Search code examples
c#.netdatagridcompact-frameworkdatasource

Modifying how a DataGrid displays itself


I have a datagrid for which I set a datasource as a list of classes, the class has several properties which the datagrid uses to create and populate itself with.

I'd like to still make use of this but rename some of the column labels, remove the row buttons (on the left side of the grid) and hide some of the columns.

I'm not sure how to do this or really what to even google?


Solution

  • I ended up using an SQL query to populate the datasource instead of a list, for reasons unknown I couldn't get datagridstyles working when lists<> where the data source but they worked fine when an SqlCeDataAdapater was the source.