Hello,
I'm trying to set a UltraProgressBar as a column's editor, however, the underlying datatype is a Nullable(of Integer). When setting the editor property I get the error "Editor provided by UltraProgressBar does not support the column's data type."
Is there any way to assign a progressbar as editor when the datatype is nullable ?
Kind regards,
Michael
Hello Michael,
To this moment, the UltraProgressBar control does not support other types than 'int'. So basically what you could do is to change the type of your data. If you feel that I misunderstood you, please provide a code snippet or a sample which will give me more details about your scenario.
Please do not hesitate to contact us if you need any additional assistance.
That is unfortunate. I can not change the type of my data. I'll have to find another way to show a progress bar.
Thanks for the confirmation.
Hello again Michael,
Here is the link to our documentation, regarding the value property of the UltraProgressBar control: http://help.infragistics.com/Help/NetAdvantage/WinForms/2011.1/CLR2.0/html/Infragistics2.Win.v11.1~Infragistics.Win.UltraWinProgressBar.UltraProgressBar~Value.html.
So I think that the control will try to convert any other type to 'int' exclusively. So the behavior you are getting is expected. Could you tell me what you are trying to achieve here, there might be another way to do it.
I will be very glad to assist you further with this.
Hello Boris,
My data source has a property of type "Nullable(of Integer)". I'm trying to show a progressbar in this column. When the property has a normal value, I want to see a normal progressbar. When the property is null/nothing then I want to see nothing or if needed, an empty progress bar.
Thank you for your feedback and for sharing your solution with the community.
Your unbound column suggestion works, but what we really wanted was not to show any progress bar at all when the value was null, and using unbound columns isn't really a good implementation in my opinion (if it can be avoided).
In attachment is your sample project that I have extended with our nullable progressbar implementation.We used the "UltraControlContainerEditor" as EditorComponent on a column. And created a user control which we assigned to the RenderingControl of the editor.The user control contains a UltraProgressBar. By implementing a value property we adjusted the appearance of the inner progressbar, hiding it when the value was nothing.
We did encounter a problem when doing this. Apparently, the UltraProgressbar does not behave in the same way when used on a user control or a form, compared to using it as editorcontrol on a cell. Specifically the values above 100% works nicely in a cell, but when used as standalone, the ultraprogressbar refuses any value above the maximumvalue. As you can see in the sample, we had to manually fill in the text property to "fake" values above 100%. Also, the text appearance and borderstyle have different default setting when using the ultraprogressbar in a cell or standalone.
The above was not really a problem tho, and as such, we were able to generate the layout we wanted.
Could you please review the sample attached to this post and see if it meets your requirements. I am using an unbound column to show the ProgressBar.
Please do not hesitate to ask if something comes up.