Click here to Skip to main content
13,145,851 members (46,452 online)
Rate this:
Please Sign up or sign in to vote.
See more:
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
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.170915.1 | Last Updated 25 Jul 2012
Copyright © CodeProject, 1999-2017
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