tag:blogger.com,1999:blog-5765821788458763196.post249170581179922546..comments2024-01-31T15:39:26.998+05:00Comments on Asim Sajjad: Changing Background Color Of DataGrid Row WPF 4Asim Sajjadhttp://www.blogger.com/profile/15400122734095984737noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-5765821788458763196.post-76974598508274044662017-08-07T22:50:28.560+05:002017-08-07T22:50:28.560+05:00I think better solution is
e.Row.ClearValue(DataGr...I think better solution is<br />e.Row.ClearValue(DataGridCell.BackgroundProperty);Anonymoushttps://www.blogger.com/profile/18383698898625439428noreply@blogger.comtag:blogger.com,1999:blog-5765821788458763196.post-17623555057541638882017-01-11T06:13:51.229+05:002017-01-11T06:13:51.229+05:00Thank you for this, is a great job.Thank you for this, is a great job.Anonymoushttps://www.blogger.com/profile/14641767963698259447noreply@blogger.comtag:blogger.com,1999:blog-5765821788458763196.post-76426500765860794882012-05-09T03:01:20.179+05:002012-05-09T03:01:20.179+05:00Thank you for this. I searched for hours trying to...Thank you for this. I searched for hours trying to do this with normal triggers. I had no clue that datatriggers even existed. Thanks!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5765821788458763196.post-649610718260510142011-10-20T17:09:00.764+05:002011-10-20T17:09:00.764+05:00Thank you. I have found this post very useful.Thank you. I have found this post very useful.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5765821788458763196.post-73605582671262764042011-04-11T15:05:25.011+05:002011-04-11T15:05:25.011+05:00The sample code will also work with large lists, i...The sample code will also work with large lists, if you add the event handler DataGrid_UnloadingRow. Therein you have to call <br />e.Row.Background = null;<br />and everything will work fine.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5765821788458763196.post-3236868214305469122011-04-05T22:49:53.958+05:002011-04-05T22:49:53.958+05:00the sample works fine as long as the items in the ...the sample works fine as long as the items in the datagrid are not many.<br />copying the person list and pasting the persons 3 times makes it obvious:<br />when you scroll down it works fine. when you scroll back up the colors dont fit any longer.<br /><br />As it is, it is just a solution for short lists.Unknownhttps://www.blogger.com/profile/18307649208587310841noreply@blogger.comtag:blogger.com,1999:blog-5765821788458763196.post-63137092247005257322010-11-28T06:02:31.273+05:002010-11-28T06:02:31.273+05:00Hi,
thanks for this post.
if you have some more ...Hi,<br /><br />thanks for this post.<br /><br />if you have some more Rows you will have randomly colored Rows. You have to define a default color in an else statement to avoid this. Look here:<br /><br />http://stackoverflow.com/questions/1509714/c-silverlight-datagrid-row-color-changePatriknoreply@blogger.com