I want to intercept cell paint event to display a diferent text from a cell value.
I want cells that contains numeric or string value and show formated text depend of this value.
I would like cells tha contains '1:3:7:8:' value and print in cell 4 items selected.
Why Cell.Text is readonly?
Why 'Value' and 'Text' can't be different ?
Thanks in advance.
There are a number of ways you can do this.
1) You could use an unbound column. Hide the real column and use InitializeRow to copy the value to/from the real column.
2) You could use a DataFilter. This will only work if you can convert both ways to and from the displayed text and the value.
3) You can use a CreationFilter to set the text on the TextUIElement in the cell. This won't work if the field is editable.
In my scenario I use a cellbutton and open another Form with an SQL Sentence that I stored in a Cell Tag Property.
In a ClickCellButton event I obtain a result and try set Cell Value to SQL result that bounds in a UltraGrid.Datasource(), but I would like to show other text. My fields aren't aditables because have a CellButton style.
The way 1 that you porpose may be a solution but you can write a little peace of code for others?
I never uses a DataFilter and CreationFilter.