GridViewDataColumn with ZeroBlank "format"

2 posts, 0 answers
  1. Dario
    Dario avatar
    61 posts
    Member since:
    Apr 2011

    Posted 30 May 2015 Link to this post

    Hi to all,

    I need to "format" a GridViewDataColumn to keep blank if it contians 0 decimal.

    This is the classical GridView that shows ledger entries that shows Debit and Credit Amount Columns, but when the cell contains 0 (zero), it would be blank and 0 (zero).

    What can I do it?

  2. Stefan X1
    Stefan X1 avatar
    482 posts

    Posted 01 Jun 2015 Link to this post

    Hello Dario,

    For this scenario, I can suggest you using IValueConverter and return an empty String for a value equal to zero. You can check the Value conversion with IValueConverter article for more information on the matter.

    Please give the approach a try and let me know if you need any further assistance.

    Best Regards,
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
Back to Top