View previous topic :: View next topic |
Author |
Message |
jkempner
Joined: 03 Sep 2008 Posts: 17
|
Posted: Wed Aug 29, 2012 2:43 pm Post subject: TypeConverter in cell data |
|
|
I have a VirtualTree control that uses data binding in the Designer. One of the columns is bound to a property with return type of an enum. I've decorated the enum with a TypeConverter that uses a simple class derived from ResourceEnumConverter, so the enum values show up nicely formatted in the column's UniversalEditBox. My problem is that I can't figure out how to get the same TypeConverter to work on the cell data when the editor is not active. Is this possible without programmatic data binding? If so, how do I do it?
Thanks,
Josh |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Wed Aug 29, 2012 10:45 pm Post subject: |
|
|
Yes this is possible. You just need to set the FormatUsingTypeConverter property on the CellBinding (in the designer) to true. _________________ Infralution Support |
|
Back to top |
|
|
jkempner
Joined: 03 Sep 2008 Posts: 17
|
Posted: Thu Aug 30, 2012 10:28 am Post subject: |
|
|
It looks like that property was added in 4.0, and we're stuck with 3.15.2 for the time being. Is there a way to do the same thing in this older version? |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Thu Aug 30, 2012 12:39 pm Post subject: |
|
|
In Version 3 you could force the TypeConverter to be used by setting the CellBinding.Format property to null (instead of "{0}") _________________ Infralution Support |
|
Back to top |
|
|
jkempner
Joined: 03 Sep 2008 Posts: 17
|
Posted: Tue Sep 04, 2012 12:04 pm Post subject: |
|
|
We ended upgrading to VirtualTree 4. Thanks for your help. |
|
Back to top |
|
|
|