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 

Edit different field with CellEditor

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



Joined: 25 Jan 2006
Posts: 6

PostPosted: Thu Feb 09, 2006 7:41 pm    Post subject: Edit different field with CellEditor Reply with quote

I have a cell in VirtualTree that displays "1m".

I want to enable the user to edit this value, but when they edit it, I want to display "1000000" in the edit box instead.

How can I tell the CellEditor to edit a different property than the one used to display the cell?

I'm using object binding. So for example, I have a column bound to an object, where the data field is "NameFormatted". However, when a user edits that cell, I want them to edit the field "Name" instead.

Got any tips?
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Sun Feb 12, 2006 8:57 am    Post subject: Reply with quote

You can set the Format field (in the CellBinding) so that the string displayed is formatted in a particular way. The format string is a standard .NET string (with a {0} placeholder for the value).

A format string of "{0:0,,m}" would give you the display you want.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
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