Click here to Skip to main content
11,797,355 members (79,703 online)
Rate this: bad
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
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 [^]
Rate this: bad
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.

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

  Print Answers RSS
0 CPallini 475
1 OriginalGriff 435
2 Maciej Los 370
3 Abhinav S 344
4 KrunalRohit 251
0 OriginalGriff 2,092
1 Maciej Los 1,760
2 KrunalRohit 1,436
3 CPallini 1,245
4 ppolymorphe 893

Advertise | Privacy | Mobile
Web01 | 2.8.151002.1 | Last Updated 25 Jul 2012
Copyright © CodeProject, 1999-2015
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