Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
420
Changing the Ultraprogressbar control's background colour in UltraWinGrid
posted

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:-

Column1 Column2 Column3=(Column1/Column2)*100 (in Percentage)
50 100 50
15 60 25

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?