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?
You do not need to use more than one UltraProgressBar control here. You can use a single progress bar for an unlimited number of cells in the grid and each cell in the grid will display a progress bar with the value appropriate to that cell.
If you are getting the same value in every cell of the grid, then either every cell in the grid has the same value or something is very wrong here.
The progress bar uses the value of the cell itself, so if you change the value of a cell, the value of its progress bar will change too, and it won't effect any other cell. If you want to get a reference to the progress bar you can use cell.EditorControlResolved.
If you need different things for each cell and what mike said is not enough, you can create a progress bar for each cell. Use InitializeRow event, each time create a new progress bar by code and use it as e.Row.Cells[indexOrName].EditorControl.
Hello,
I still don't understand how to increment values of the cell imbedded progress bar as explained above. I assume your this.ultraProgressBar1 is a progress bar placed on the winform (and maybe hidden). So all of your rows are assigned the same progress bar.
i did the same in my grid. Result: once I change the cell value, all progress bars are getting the same value... that's what I expect I have always assigned the same progress bar control.
or is this working differently? So is ultraProgressBar1 only acting as a template (for layout purposes only)? How can I increase the values of the cell-integrated progress bar if it is not the cell value itself?
YoursStephan
What I would do use use a second ProgressBar control with the color setting you want for the error cells. Then assign the EditorControl on the cell to one progress bar or the other, depending on whether there is an error or not.
Hi Mike,
Tnx a lot for quick responce! U solution works fine. The probgress bar itself don't look so fancy with Transparent as it was by default but still nice.
The next my question is: do I have any other ways to control progress bar appearance rather that PercentSettings? For example next my step is make progress bar red in case if some error ocure. How I can do it? The onlyone idea in my mind is set max value to 101 and treat 101 as error. The issue here that in this case progress bar will never be full even when 100% done. What do u think?
thanks