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
310
display or hide zero values like in Excel
posted

 Is it possible to display or hide zero values in a UltraGrid like in Excel?  I've bound an ultragrid to a list of objects.  Some of the properties of the object are of integer and decimal types.  When I do a add new row (i.e., when a new object is created), I want to show blanks instead of 0 or 0.0 in these fields.  Excel has a feature to do this (http://office.microsoft.com/en-us/excel/HP051998791033.aspx).  Is there a way to do the same using UltraGrid (Wingrid)?

Parents
  • 469350
    Verified Answer
    Offline posted

    I'm not sure if you can do this. You might be able to use the Format property and see if there is a numeric format that shows blanks when the value is zero. 

    If your data source supports it, maybe you could initialize the value of the cell to DBNull.Value instead of 0.

    Another option might be to use a DataFilter or a DrawFilter. The DrawFilter would only help when the cell is not in edit mode, though.  

Reply Children