Click here to Skip to main content
15,887,267 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
private void Liste()
{


ID = Convert.ToInt32(MainWindow.UserID);

var data = from p in dc.ToplantiTalepFormus from c in dc.Onays where p.Toplanti_Talep_ID == c.Toplanti_Talep_ID select new { p.Toplanti_Talep_ID, p.Toplanti_Talep_Tarihi, p.Toplanti_Tarihi, p.Toplanti_Saat, p.Toplanti_Konusu, p.Toplanti_Yeri, p.Toplanti_Şekli, p.Toplantı_Durumu, c.Toplantı_Onay, c.Yeni_Tarih, c.Yeni_Saat, c.DeğişiklikOnay, c.User_ID };

foreach (var ToplantiTalepFormus in data)


{
if (ToplantiTalepFormus.User_ID == 1)
{
Datagrid.RowBackground = Brushes.Red;
}
Datagrid.ItemsSource = data.ToList();

}
this is I try to do it but When I do
if (ToplantiTalepFormus.User_ID == 1)
{
Datagrid.RowBackground = Brushes.Red;
}


What I have tried:

this is I try to do it but When I do
if (ToplantiTalepFormus.User_ID == 1)
{
Datagrid.RowBackground = Brushes.Red;
}
Posted
Updated 15-Sep-17 0:21am
Comments
ANIL AYDINALP 15-Sep-17 5:49am    
this is I try to do it but When I do
if (ToplantiTalepFormus.User_ID == 1)
{
Datagrid.RowBackground = Brushes.Red;
}
İt give all row background is red

1 solution

You already posted this question at How to change row color from datagrid on condition? It is importan for me[^] and received some suggestions. Please do not repost.
 
Share this answer
 
Comments
Graeme_Grant 15-Sep-17 6:23am    
and answered (twice) ;)

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