Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
Can Anybody post an Article or a simple demo on WPF datagrid that displays the status of a application ( for instance some server showing the information as(Running/Stopped)) , so that it highlights the datagrid cell as Red-when server=stopped and Green when the server status=running?
 
It would be really helpful !
Thanks
-Indi
Posted 12-Dec-12 6:03am
Edited 12-Dec-12 6:40am
v2
Comments
Sergey Alexandrovich Kryukov at 12-Dec-12 11:30am
   
Why a database and a grid for status? You certainly mean something else. I would not expect an article on this topic though.
--SA
Ind_Pri at 12-Dec-12 11:35am
   
I have already setup'd a monitoring agent that looks over my server statuses.
My database is already defined and is running well. Now I have to bring this to a presentation layer, to display the server status.
So I decided to display in a form of traffic signal (RED-stopped, Green-running and Yellow for critical). But I don't have much knowledge in WPF animation.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Hi,
 
Please check http://wpftutorial.net/DataGrid.html[^]
 
This site is best for WPF beginner
 
Best luck
  Permalink  
Comments
Ind_Pri at 12-Dec-12 11:32am
   
I visited this link already. anyways thanks for the effort :)
@AmitGajjar at 12-Dec-12 11:38am
   
When i have started learning WPF, i used to visit this site.
@AmitGajjar at 12-Dec-12 11:39am
   
you still have issue ? have you tried something ?
Ind_Pri at 12-Dec-12 11:45am
   
but it is highlighting the starting of the row , but not the exact cell..
Ind_Pri at 12-Dec-12 11:42am
   
Yes,I have already tried something..
I created a converter that gets the cell value, for instance Value='Stopped'
and it highlights as red.
 
public class myConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
string cellvalue = value.ToString();
return cellvalue = ("Stopped");
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return false;
}
}

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

  Print Answers RSS
0 OriginalGriff 350
1 Jochen Arndt 190
2 Richard MacCutchan 135
3 Sergey Alexandrovich Kryukov 120
4 DamithSL 105
0 OriginalGriff 6,045
1 DamithSL 4,611
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,310


Advertise | Privacy | Mobile
Web01 | 2.8.141220.1 | Last Updated 12 Dec 2012
Copyright © CodeProject, 1999-2014
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