In the WinGrid sample explorer for Infragistics 7.1 version, a sample named "Flood Fill" (located in "Extensibility Samples")demonstrate how progress bar can be included in cells.
I have studied the source code and seen that this functionality in not a built-in one, but uses the DrawElement method to paint a rectangle in each cell. I have also remarked that for long bounded tables (ie with a lot of rows), rectangles take some time to draw (we can see each rectangle to be drawn).
I would like to know if this functionality is now included in the component or if it will be in the futur. If not, are there some possible code optimisations to do to increase draw performance?
Thanks in advance.
Rico
Hello,
Did you find a solution for this problem? I have the same issue: impossible to use Progressbar on computed columns (I am using the 9.1 release of WinForms);
Hi Mike,
Unfortunatelly, setting to 'Single' datatype on both columns produce the same results (performance drop and nullReference exception at Infragistics.Win.UltraWinProgressBar.ProgressBarEditor.get_Value()).
Setting break on all exceptions did not bring any program break, so as no more details can be found, I would send a sample program to the Developer Support to let them investigate the problem.
Thanks for your recommendations.
Rico.
CalcManager typically likes to work with doubles (rather than singles), so you might try changing the data type of the column to double and see if that helps.
That seems unlikely to be the problem, though - I would think the conversion from double to single would be easy enough and not cause an exception unless the value was too large.
Have you tried setting the IDE to break on all exceptions and see if any are occurring?
If that doesn't help, I think you should probably create a small sample project that demonstrates the problem and submit the issue to Infragistics DeveloperSupport so they can investigate. Get Help
The problem I described happens only for 'calculated' columns (ie a column with a Formula defined). I thought the same for performance problem explanation (exception handling hurt performances).
My added column (unbound) is of Single datatype and displays only an other column value (which is of Single type too). The datasource table contains one column (called 'Number') and 5 rows (values are between 0 and 103). Here is a short code snippet on how I added the progressBar column:
Private Sub UltraGrid1_InitializeLayout(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles UltraGrid1.InitializeLayout dim col as Infragistics.Win.UltraWinGrid.UltraGridColumn col = UltraGrid1.DisplayLayout.Bands(0).Columns.Add("Calculated") col.DataType = gettype(Single) col.Formula = "[Number]" col.MinValue = 0 col.MaxValue = 103 Dim upb As New Infragistics.Win.UltraWinProgressBar.UltraProgressBar upb.Visible = False Me.Controls.Add(upb) Col.EditorControl = upb
End Sub
ricoledaouf said:An other problem is a huge performance penality when setting the UltraProgressBar to the column's editor control property, even for small datasource (2 columns & 5 rows) : all actions on the form freezes it for several seconds.
Do you mean that this happens in the calculated column? Or for other columns as well?
It sounds to me like the ProgressBar is throwing an exception based on the value it's getting from the grid. This explains both why it's not displaying the value and the slowdown - exception handling is very performance-intensive.
What's the DataType of the calculated column? If this is an unbound column, then it will default to String, which might explain the issue, since the progress bar can't handle a string (it needs a numeric value).