Is there any way to add progress bar and image into a cell simultaneously like attached image?
Okay, I tried this out and it's a bit more complicated than I thought. The TextUIElement in the ProgressBar does something different. It draws the text in different colors so that the text can be viewed easily if it crosses the boundary there the fill of the progress bar ends.
So it doesn't seem like using a new TextUIElement will work and changing the text on the Existing one isn't possible in the CreationFitler, because the ProgressBar sets the text during the appearance resolution.
But... I found a way to make it work. Since the text gets set during appearance resolution, you can change the Text in a DrawFilter. Changing UIElements in a DrawFilter is not usually a good idea, but in this case, it seems like it works and I can't see any harm in it.
I am attaching a new sample project here to demonstrate how I got it working. I used a Decimal column and formatted the text for currency, but you can modify the DrawFilter code to format the text however you want.
Also, I noticed while implementing this that the TextUIElement fills the entire ProgressBar, anyway. So you don't have to worry about measuring the text, which is something I was concerned about earlier.
Hi,
If I understand correctly, what you are doing right now is setting TextVisible to false, which removes built-in TextUIElement, and then you are adding your own TextUIElement.
I kind've assumed that the TextUIElement you are adding is outside of the ProgressBar, sibling to the ImageUIElement.
So instead of setting TextVisible to false, you could use the CreationFilter to remove the existing TextUIElement and then add your own. Or, even easier, just leave the existing TextUIElement and change it's text. It just depends on where you want the text to display.
If I remove the TextUIElement from the progressbar, how can I display the decimal value in the cell with progressbar??
Well, one thing you could do is set TextVisible to true and the remove the TextUIElement from the progressbar using the CreationFilter. That would affect the display without affecting the copy/paste functionality.
I turned off the text in the ProgressBar and added TextUIElement next to the ProgressBar to show the decimal value.
However, it occurred another issue, which the cell value is not copied when the TextVisible property of the ProgressBar set to false.
I set the property of AllowMultiCellOperation to All in order to allow users to copy the grid to excel. In this case, it does not work properly.
I need a complicated function of the grid of which cell has a image, progressBar and decimal value, and allows users to copy the value to excel.
Do you have proper solution of it?