Hello All,
I am developing a Windows Forms Application and am making use of the latest Infragistics controls in my application. The datasource is assigned for the UltraWinGrid dynamically by binding a dataset to the UltraWinGrid control. I am having a column with datatype "double" in my dataset which does some trivial calculations based on the other column values. For eg:-
So, this is how my dataset looks before being bound to the grid.Now, in the initializelayout of my grid, am setting the "editorcomponent" of "column3" to the progressbar control which i mentioned earlier. Hence, the third column contains the progressbar control with appropriate percentage displayed in it. I have set the background colour of the filled area of the progressbar control to "blue" and I have changed some other properties of the ultraprogressbar control in order to give a sleek look. Now, my requisite is that the background colour of the filled area should change according to the percentage value. For example, if the percentage is below 50, I should have a black background and if the percentage is above 50, I should have a green background,etc; Is there any inherent property that the ultraprogressbar possesses so that we could make use of it?
Otherwise, how could we accomplish this?
Right. You add a PercentSettings for each threshhold you want. I always forget if the percentage is lower or higher, but I like it's lower. So if you want to do something like this:
0%-30% = Red
31%-70% = Yellow
71%-100% = Green
You would set up the control to use Green for the FillAppearance by default. Then add 2 PercentSettings: One for 30% Red, and the other for 70% Yellow. They get applied in order, so <30 takes precedence over <70.
As I said, I might have that backward, it might go from the PercentSettings and up rather than down, but either way, it's the same basic concept.
ok I got it. Just we need to set the value of the step property right?
spot on.......you are absolutely right....Thank you very much.......However am not able to give a range of percentage in the percent settings. So, if the range is say 10-50%, then should i define the colours for each and every percent. Or is there any other way to achieve this?
Hi,
I think what you are looking for is the PercentSettings collection property on the ProgressBar. This collection allows you to add different appearances to the control based on certain threshholds of values.