Hi,
I m displaying a ultraprogressbar in a Ultragrid cell.My problem is that the progress bar depends on data from other column of grid.The maximum property of ultraprogress bar should be assigned a value through loop.i.e. i wish to assign different value to maximum when looping through each row of grid.
My code is
For Each row In UltraGrid1.Rows
UltraProgressBar1.Maximum = row.Cells("Planned Hours").Value
Next
But here the maximum takes the last value in the loop.But I need to assign a different value at each iteration of the loop.Is it possible???????
Please Help me...................
You need to create a different progress bar for each cell.
Change this:
To:
UltraProgressBar bar = new UltraProgressBar()
bar.Maximum = row.Cells("Planned Hours").Value
row.Cells("Percentage").EditorControl = bar
Two more tips:
1. Don't enumerate rows. Use InitializeRow event and get the row from e.Row. Thsi event occurs also when a cell value is changed.
2. Set the progress bar text to "[Value] / [Maximum]"
Thank u Amiram Thanx a lot...................
The code u gave worked well..................Thanx again.