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
855
NA 2012.2: XamGrid and nullable decimals
posted

I have a business object based on IList which contains a nullable decimal attribute which is populated from SQL Server table. The BO handles the nullable decimal correctly but when the value is displayed in the XamGrid, a "0" / zero is displayed. I would like to have nothing displayed in the cell if the value is null.

Please assist.

Parents
No Data
Reply
  • 17475
    Verified Answer
    Offline posted

    Hello, 

    Thank you for posting! 

    I have been looking through your scenario and I created a sample project. In order to change the displayed text when the value is null, you could use a template column and use a converter to check whether the displayed text is zero. If the text is zero the converter returns empty string.

    Please feel free to let me know if you have any questions on the matter.

    XamGridDecimal.zip
Children