WPF: DataGrid Custom. ColumnDesign with my own classes
Posted
by
user437899
on Stack Overflow
See other posts from Stack Overflow
or by user437899
Published on 2010-12-29T08:41:43Z
Indexed on
2010/12/29
8:54 UTC
Read the original article
Hit count: 263
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)
© Stack Overflow or respective owner