Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to highlight Row & Columns whose Cell is hovered in WPF DataGrid.
I have selection Unit of DataGrid Set to Cell.
I have not used RowStyle & ColumnStyle just using CellStyle, I have set the RowBackground to transparent.

How to accomplish this without using the RowStyle?

Thanks!
Posted
Updated 6-Oct-23 9:15am
v3
Comments
Prerak Patel 10-Aug-11 3:11am    
All the cells in row and column? or just the headers?
Varsha Ramnani 10-Aug-11 3:20am    
All Cells in Row and Column

1 solution

 
Share this answer
 
Comments
Tarun.K.S 10-Aug-11 3:33am    
Excellent link. 5+
Varsha Ramnani 10-Aug-11 3:35am    
Tarun I know the link is good But it doesn't match my requirements as I have mentioned
Varsha Ramnani 10-Aug-11 3:34am    
I have checked this link yesterday only but It uses RowStyle to highlight & also It needs the Selection Unit to be Set to FullRow Rather than Cell and I have Selection Unit as cell.
Venkatesh Mookkan 10-Aug-11 4:55am    
Varsha,
The example which Prerak given is excellent. You cannot expect the exact solution always. It is easy to make your requirement work using the given example. That guy also given the idea of using the Attached Property. You should leverage the property to achieve your requirement.
Varsha Ramnani 10-Aug-11 6:02am    
I know that. I also said that it is a nice link & I am not looking for the exact answer either.

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