We are using UltraWinTree with ViewStyle OutlookExpress and a RootColumnSet.
In a column with decimal values and format "N0", we would like to use the Format "N1" for a single (special) row.
One of our trees is readonly. In another tree some cells of this column in some rows are editable, but not in the special row.
Is it possible to control the format for a single cell without having to use "N1" for the whole column?
Hi,
Thank you for posting in our forums.
What you could do in order to achive different formats within the same column is to assign a text editor to the column’s editor property and then create a custom DataFilter for this editor. This will allow you to format the columns based on your needs. For more information on DataFilters please visit this link:
http://help.infragistics.com/Help/Doc/WinForms/2011.2/CLR2.0/html/WinGrid_Using_the_IEditorDataFilter_Interface_with_WinGrid.html
I have attached a sample that demonstrates this approach. It takes the formats from the “Format” column and applies them to the cell “Number” column.
Please let me know if you have any additional questions.
Hi Dimitar
Thank you for your advice and providing sample.
In the meantime I tried a FormatProvider that checked the numbers floor against the number and formatted as N0 or N1. It mostly worked ok, but seemed a bit shaky, as I could not find a way to access the current row, cell or node and determine with surety the special format.
So your solution is much better for us, as we can determine the node and access all its properties.