Friday, 15 February 2013

wpf - DXGrid binding not showing cell value -



wpf - DXGrid binding not showing cell value -

i updating project utilize devexpress dxgrid. note: using mvvm lite toolkit.

i binding default wpf grid, want ramp utilize dxgrid. "think" binding correctly, when grid displays cells empty. row number right (i.e. have 3 cars, 3 rows) seeing data, sure missing property somewhere becaus enone of text displays cells empty

<dxg:gridcontrol.columns> <dxg:gridcolumn fieldname="{binding path=id}" header="id"/> <dxg:gridcolumn fieldname="{binding path=nominationdate, stringformat=\{0:dd/mm/yyyy\}}" header="nomination date" /> <dxg:gridcolumn fieldname="{binding path=carnumber}" header="carnumber"/> <dxg:gridcolumn fieldname="{binding path=carname}" header="car name" /> <dxg:gridcolumn fieldname="{binding path=colour}" header="colour"/> </dxg:gridcontrol.columns> <dxg:gridcontrol.view> <dxg:tableview name="tableview1" selectedrowssource="{binding selection}" multiselectmode="row" navigationstyle="row" /> </dxg:gridcontrol.view> </dxg:gridcontrol>

try prefixing properties rowdata or data. these dependency objects exposed dxgrid retreival of bound data. in case have below..

<dxg:gridcolumn fieldname="{binding rowdata.path=id}" header="id"/> or <dxg:gridcolumn fieldname="{binding data.path=id}" header="id"/>

wpf devexpress mvvm-light

No comments:

Post a Comment