Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Silverlight
Hi everyone,
 
Silverlight datagrid has a feature of highlighting a row on mouse over and click events by default. In my case, i don't want to highlight the rows, because here the grid is being used just to display some info(read-only). Can any one help me. Thanks in advance. . .
Posted 24-Jul-12 20:46pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

For removing the highlighting, you need to apply styles to cell and rows of grid.
CellStyle: property is the one which will remove the light blue highlight around the currently selected cell
RowStyle: property is the one where you will be able to remove the light blue shade indicating the selected row.
 
Refer: How to remove the mouseover highlight and selected row highlight in a Silverlight datagrid[^]
 

For removing click:
Set IsReadOnly to true to disable editing.
 
Another blog entry talking on similar thing: Easily Disable Row Selection for a Silverlight DataGrid [^]
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

You can set the IsReadOnly property to True. That way you can disable events and cancel the highlight of the row, even columns.
 
You can apply some Styles on the DataGrid, but I think is unnecessary for your scenario.
 
Hope it helps.
  Permalink  
v2

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 288
1 Maciej Los 260
2 Manfred R. Bihy 190
3 _Amy 180
4 CHill60 180
0 OriginalGriff 7,445
1 Sergey Alexandrovich Kryukov 6,177
2 Maciej Los 3,774
3 Peter Leow 3,478
4 CHill60 2,702


Advertise | Privacy | Mobile
Web04 | 2.8.140721.1 | Last Updated 25 Jul 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100