WPF: DataGrid Custom. ColumnDesign with my own classes
- by user437899
Hi,
iam looking for a datagrid which contains objects from my class.
class user
{
string name;
int ID;
...
}
i tried AutoGenerateColumns = true. this will add columns (name, ID, ... like the properties of my class)
but i want a different design. not all attributes from the object shold be shown and the columnheader shouldn't be generated from the variablenames...
if i build a custom. column-design, i cant add my objects / they will not be displayed.
is it possible to define my own columns according to my objects/class.
i read about databindings, but i have no idea how i can bind objects/classes in WPF.
(in Visual Studio i cant choose my class as datacontext)