I am using an UltraGridFilterUIProvider for the filter of the Ultragrid.
When I clicked the filter of the some columns, there are some problems.
1. decimal values appear integer such as 90(90.11) and 92(92.84).
2. ValueListItems are empty although there are values in that column.
Hello,
I am just checking about the progress of this issue. Let me know if you need my further assistance on this issue.
Thank you for using Infragistics Components.
I fount out that the ValueListItems of the column which has a UltraProgressBar are empty.
Is there any way to use filter although I set the EditorComponent to a UltraProgressBar?
Hi,
Thank you for the reply.
I created a small sample project in order to test this. Everything seems to be working properly for me. Note that if you use the UltraProgressBar as a column’s editor component, when you drop down the filter it will display the row values with a percent sign next to them.
I am attaching the project that I used to test this. Please modify it so it reproduces your issue and I will be glad to research this issue further.
Please let me know if you have any additional questions.
Thank you for your sample code.
I found out the reason why the valuelist of my filter is empty.
I used the DrawFilter like below to show the value not the percentage.
In this case, is there any way to add the values into valuelist??
public bool DrawElement(DrawPhase drawPhase, ref UIElementDrawParams drawParams) { var textUIElement = drawParams.Element as TextUIElement; if (textUIElement != null) { var cell = drawParams.Element.GetContext(typeof(UltraGridCell)) as UltraGridCell; if (cell != null) { textUIElement.Text = cell.Value.ToString(); } }
return false; }
public DrawPhase GetPhasesToFilter(ref UIElementDrawParams drawParams) { if (drawParams.Element is TextUIElement && drawParams.Element.Parent is ProgressBarUIElement) { return DrawPhase.BeforeDrawElement; }
return DrawPhase.None; }
Even when using your DrawFilter everything seems to be working properly at least in the sample I sent you. Still if you are sure that the issue is caused by the DrawFilter, you can remove the percent signs using other means, like through the FormatInfo property of the ProgressBar. Clone the current culture and set its PercentSymbol to be empty string, then set the FormatInfo to the cloned culture info:
var cultureInfo = (CultureInfo)System.Threading.Thread.CurrentThread.CurrentCulture.Clone();
cultureInfo.NumberFormat.PercentSymbol = "";
this.ultraProgressBar1.FormatInfo = cultureInfo;
This way the progress bar won’t show percent symbols and you won’t need the draw filter.
I used the DrawFilter to display decimal value because the ultraProgressBar shows integer value.
When I use the DrawFilter, the valuelist of the filter is empty.
You said that you don't have the problem although using the DrawFilter. Please give me that sample and I'll check what the problem of my code is.
I have attached the requested sample. The easiest way to debug this issue is if you are able to provide us with a small sample which reproduces it. This way we will be able to see what exactly is causing the filter to be empty and see how it may be resolved.