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
60
WinGrid and WindProgressBar as column editor control
posted

Hi All,

 

I'm using WinProgressBar as column editor to show the  progress for particular row. It looks like the followin:

| action_1_name | action_1_progress |

| action_2_name | action_2_progress |

...

| action_N_name | action_N_progress |

The general question is: how can I modify the progress bar properties for particular row? For example - I need that while action in progress the progress bar color will be let say red, but once the action complete for particular row - the progress  bar become greeen for this row. Is it possible?

 

thx

Update: I decided to play with progress bar colors but it doesn't work for me at all. I tried to set the progress bar collor in InitializeLayout like this:

        private void Grid_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
        {
            progressBar.UseOsThemes = DefaultableBoolean.False;
            progressBar.FillAppearance.BackColor = Color.Green;
            e.Layout.Bands[0].Columns[1].EditorControl = progressBar;
        }

But the color still the same(system one?). Can any1 have any idea?

Parents
No Data
Reply
  • 469350
    Offline posted

    Setting UseOsThemes on the progressBar control will not have any effect on the grid because the grid has it's own UseOsThemes property. The grid only picks up properties from the editor if the grid doesn't have it's own property to deal with those settings.

    So what you need to do is turn off themes on the grid. Or... you probably just want to turn off themes on the one column, which you can do using the ThemedElementAlpha. 

    To get different appearances of the progress bar at different values, you use the PercentSettings. 

    So try something like this: 

     

            private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
            {
                this.ultraProgressBar1.FillAppearance.BackColor = Color.Red;
                PercentSetting percentSetting100 = this.ultraProgressBar1.PercentSettings.Add(100);
                percentSetting100.FillAppearance.BackColor = Color.Green;

                rootBand.Columns["Int32 1"].MinValue = 0;
                rootBand.Columns["Int32 1"].MaxValue = 100;
                rootBand.Columns["Int32 1"].EditorControl = this.ultraProgressBar1;           
                rootBand.Columns["Int32 1"].CellAppearance.ThemedElementAlpha = Alpha.Transparent;                       
            } 

Children