Click here to Skip to main content
15,881,715 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
I have a problem with a dataGrid style that changes between different computers.
In a specific scenario: One row is selected from the code and we change the selection to a different row manually. In one computer only the second row is selected (as it should), in a different computer, it seem like both the previous row and the current row are selected (Even though when debugging we can see only the second row is selected, and the first row is only presented as it is selected).
I suspect there is some property the previous row is marking as true, and the style is similar to the selection style. Any Idea what this property might be? And Why does it presented differently in different computers?
Posted
Comments
Sergey Alexandrovich Kryukov 25-Nov-14 10:47am    
Not enough information. The productive approach would be: create some minimal code sample, as small as you can; it can be even put in just one file, but the sample should be comprehensive and allow to reproduce the problem. The publish that sample project using "Improve question". Specify all essential detail on those systems. See also: SSCCE.
—SA

1 solution

Datagrid will present differently in different computers if you give a fixed size. you need to use something like this

XML
<window xmlns:ctrl="clr-namespace:Itenso.Windows.Controls.ListViewLayout;assembly=Itenso.Windows.Controls.ListViewLayout">

 <gridview>
  <gridview.columns>
   <gridviewcolumn ctrl:rangecolumn.minwidth="50" width="50" ctrl:rangecolumn.maxwidth="50">
   </gridviewcolumn>
 </gridview.columns>
</gridview>
</window>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900