Hello all.
I want to have in my UltraWinGrid an UltraProgressBar.
I searched this forum and I've tried everything you said in previous threads (ex : http://news.infragistics.com/forums/p/11841/44805.aspx#44805 ) but it doesn't work for me.
I've tried 2 aproaches:
1) added an UltraProgressBar next to the grid, set it's Maximum to 100 and Minimum to 0, even the Value to 50. The ProgressBar looks ok. Then in code I'm adding a new column to the grid
e.Layout.Bands[0].Columns.Add("Level", "Level");
and set it's EditorControl property to that progress bar
e.Layout.Bands[0].Columns["Level"].EditorControl = ultraProgressBar1;
I even set the column's MinValue and MaxValue to 0 and 100.
When I run my application, my new column "Level" is always showing 0%.
2) then I tried to create a UltraProgressBar in the code, set's its Maximum, Minimum and Value to the exact values as above, set it as the EditorControl of the "Level" column but the same result.
What am I doing wrong and what do I need to set so that the ProgressBar shows me what I need ?
Note : my UltraWinGrid is in CardView mode, and I want the ProgressBar to be Vertical oriented.
Thank you.
Hi,
The Value of the progress bar will be determined by the value of the cell, not the control on the form. Using the control's value would make no sense, since it can only have a single value and that would be useless in a grid.
You need to set the DataType on the unbound column to something the progress bar can accept (Int32) and assign actual values (presumably between 0 and 100) to the cells in the grid. For an unbound column, the InitializeRow event is a good place to do this.
Got it. Set the column's DataType to typeOf(Int32) and in the InitializeRow event of the grid I'm setting the cells' values to 50 (for the moment) and it works.
But I still have a problem. Allthough I'm setting the ProgressBar's Orientation property to Vertical, in the grid is still shown Horizontal. Is there any way I can fix this ?
Here is my code in the InitializeLayout event of the grid
e.Layout.Bands[0].CardView = true;
e.Layout.Bands[0].CardSettings.CaptionField = "EquipmentName";
UltraProgressBar tankPB = new UltraProgressBar();
tankPB.Orientation = Orientation.Vertical;
tankPB.Minimum = 0;
tankPB.Maximum = 100;
e.Layout.Bands[0].Columns["Level"].Editor = null;
e.Layout.Bands[0].Columns["Level"].EditorControl = tankPB;
e.Layout.Bands[0].Columns["Level"].DataType = typeof(Int32);
Hi Sorin,
I took a look and it looks like the Orientation comes from the owner. The owner in this case is the grid, and since the grid column doesn't have a property on it to allow you to set the orientation, there is no way to have a vertical ProgressBar in the grid.
The good news is that we will be adding a new feature in NetAdvantage 2009 Volume 1 which will allow you to embed a control into a grid cell. So you will be able to put the ProgressBar control into the cell instead of using it as an editor.
is there a option to display a progress bar behind a row (each row on demand)?Why? I searching for a way to signal the user that an action (clicking + on a row and load the details in the backround) is still in progress.
Atm. I only change the color of the row till I finished loading the child rows, but it could be much better to show a half transparent progress bar behind the row.
Why not as an extra column? I want to save my space in the grid and show the full row. Otherwise I could add an unbound column and hide some other columns during load.
Is there a better way to get a progress indicator in the backround of a row?
Kind regards
Ralf
Hi Ralf,
I can't think of any really simple way to do this. You could use a DrawFilter on the grid and try to draw the ProgressBar over the row yourself using a timer to invalidate the row continuously until the animation completes, but it's probably a lot more effort than it would be worth, in my opinion.
You can certainly Submit a feature request to Infragistics.
"a lot more effort than it would be worth"
Yes, I agree. But maybe a new feature for the next versions? :)Property: ShowExpandingActivity = Showing an 50% transparent UltraActivityIndicator in a backround of that row which expands his childs. Visible between the BeforeRowExpanded and AfterRowExpanded event.