View previous topic :: View next topic |
Author |
Message |
rp
Joined: 25 Jan 2006 Posts: 6
|
Posted: Thu Feb 09, 2006 7:41 pm Post subject: Edit different field with CellEditor |
|
|
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 |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Sun Feb 12, 2006 8:57 am Post subject: |
|
|
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 |
|
|
|