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
703
Formatting Cell
posted

I have BindingList of a class binded with ultrawingrid. The columns where I need format are or type decimal. By default cell has value 0.00 in them. But I need to display it empty  if doesnot have value. If I appy integer format using # then on loosing focus, decimal part disappears . 

 

What I need is to display the blank cell if it has value 0.00 or simply 0. Else the floating value. And Also I have a column for its total, i need to display there 0 in case all seven column are empty.. 

 

 

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    I don't know if this is possible with a Format. But the Format property simply calls the ToString method on the cell's value and passes in the format you specified, so the formats are defined by the data type.So they are documented by Microsoft:

    Standard Numeric Format Strings

    Custom Numeric Format Strings

    If there's no format that will do what you need, then you might be able to achieve what you want using a DataFilter or a DrawFilter.

    The DataFilter allows you to handle the translation of the cell value from the editor to the display and vice versa.

    The DrawFilter lets you draw the cell text yourself.

Children
No Data