Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
715
How to format label
posted
Hi, I am trying to understand UltraTreeNodeColumn.Format property if have value as "country" what should i set Format property to get some thing like below country : for example convert Location to Location: convert State to State: Thanks, Kumar
Parents
No Data
Reply
  • 469350
    Offline posted

    Hi Kumar,

    When a tree cell shows the text, what is does is it takes the Value of that cell and calls the ToString method on it and passes in the Format you specified. 

    So the formats that are supported for any column depend on the data type of the value of that column. It sounds like you are using Strings here, and the String data type does not support any formatting. Formatting is only supported for numeric types. 

    So you have a couple of options. 

    1) You could change the Value of the cell to display the text you want. 

    2) You could use a DataFilter to add / remove the colon.

    3) You could use a DrawFilter to draw the text in the cell yourself. This method is really only useful if the field is read-only. 

Children