Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TypeConverter in cell data

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support
View previous topic :: View next topic  
Author Message
jkempner



Joined: 03 Sep 2008
Posts: 17

PostPosted: Wed Aug 29, 2012 2:43 pm    Post subject: TypeConverter in cell data Reply with quote

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
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Wed Aug 29, 2012 10:45 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
jkempner



Joined: 03 Sep 2008
Posts: 17

PostPosted: Thu Aug 30, 2012 10:28 am    Post subject: Reply with quote

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
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Thu Aug 30, 2012 12:39 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
jkempner



Joined: 03 Sep 2008
Posts: 17

PostPosted: Tue Sep 04, 2012 12:04 pm    Post subject: Reply with quote

We ended upgrading to VirtualTree 4. Thanks for your help.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group