Hi,
I have upgraded to v7.3 infragistics and code which previously worked (in 5.1) is no longer.
Basically I have a grid with 3 columns, the 3rd column is used to display data in both value and progress bar, I achieved this previously by associating each cell.EditorControl with a new instance of UltraProgressBar. However when the code runs, the %value's appear but the progress bar itself fails to paint on each cell.
So at run time we can add an item to the grid and its value and %value in the bar would appear.
cell.EditorControl = CreateBar();
then later when I want to update the value foreach(row/cell in the column of columns)
at this point the percent value updates but the bar fails to be displayed.
Hi Tony,
Check out the PercentSettings on the ProgressBar control. You can assign appearance properties based on the percentage value of the progressbar.
Mike,
Sorry for the confusion - You're right (of course!) that the CellActivation doesn't really matter. I think I confused myself on that...
Setting BackColor & BackColorDisabled to the same value works a charm.
On a related note - is there anyway to set the attributes of the progress bar such that it's color changes based on the cell values? I tried using InitializeRow, but it seems that the value for EditorControl is not set at the time of InitializeRow... I know I could create and assign a new object instance to EditorControl, but if I do that don't I also have to deal with disposing of the object?
Thanks again,
tonyB.
Okay... I'm puzzled by a couple of things.
The sample you sent me has CellClickAction set to RowSelect. So the CellActivation should not matter, when you click on the progress bar, the entire row gets selected. The cell might get activated internally, but why does that matter?
Also... I already gave you another potential solution. If you don't want to change the CellActivation on the column, all you have to do is set both BackColor AND BackColorDisabled on the FillAppearance for the ProgressBar to the same color. Did you try that and it didn't work or something?
Thanks for that - definately a step in the right direction. However the downside of not setting the progress bar column to disabled (column.CellActivation = Activation.Disabled) means that when the user clicks on the progress bar, the cell is activated (adding a BeforeCellActivation handler and setting e.Cancel = true doesn't stop the activation it seems). Not what I want. All of my grids are read/display-only.
The reason for my setting all the appearances is I have many grids, across many screens and I use a common function to initialize them rather than waste spend time fiddling about with every gird property via the designer.
Is there a better way to globally disable all individual cell activation (forcing row selection) and turn off all editing functions?
I did a little trial and error testing and it looks like the problem is this line of code:
column.CellActivation = Activation.Disabled;
Since the cell is disabled, it's using the BackColorDisabled instead of the BackColor of the FillAppearance you assigned.
Normally, this would not be a problem, but you are also setting displayLayout.Override.CellAppearance = defCellAppearance, which has a BackColorDisabled of Window, so basically, the fill appearance on the progress cell is resolved to white when disabled.
So you can either set BackColorDisabled in addition to BackColor, or else don't disable the ProgressBar column.