.net - WPF DataGrid Display Issue In Windows XP -
can 1 me...
1)
problem -->
|name__|address__|________________<---datagrid header |------------------------------------------------------------------- <--rows |------------------------------------------------------------------- |-------------------------------------------------------------------
rows getting cutted.
2)
want this->
|name__|__address____|_______________<---datagrid header |_abc__|xyz________|_______________
|_ahj__|xzs________|________________
|_alk__|xyf________|________________ can see row detail.
i having trouble of rows not displaying in windows xp, program build in win 8, wpf .net framework 4.0,3.5,4.5. of them having same issue.
am missing something? how solve this.
wpf datagrid,has auto generatedcolumn = true.
here code. xaml
<datagrid x:name="dgconfirminquiry" horizontalalignment="left" margin="48,136,0,0" verticalalignment="top" height="134" width="718" background="#fff0ffe3" autogeneratingcolumn="dginquiry_autogeneratingcolumn" isreadonly="true" mousedoubleclick="dginquiry_mousedoubleclick" selectionchanged="dginquiry_selectionchanged" autogeneratecolumns="true"> <datagrid.contextmenu> <contextmenu> <menuitem x:name="menuregister" header="register" click="menuregister_click" /> </contextmenu> </datagrid.contextmenu> </datagrid>
at code behind filling itemsource of datagrid list. on windows 7,8 not having issue. happening in windows xp.
thanks.
it because setting values margins , possibly height , width too. windows xp treats differently windows 7/8 , displays differently.
you should remove these xaml attributes , can use alternative methods positioning , sizing, such placing datagrid grid cell , setting width via grid.columndefinitions , height via grid.rowdefinitions. use vertical , horizontal alignment setting margins (which relative grid cell). can assign datagrid margin via grid.column , grid.row attributes.
let me know if need example , i'll update accordingly.
Comments
Post a Comment