This is a migrated thread and some comments may be shown as answers.

GridViewDataColumn with ZeroBlank "format"

1 Answer 63 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Dario
Top achievements
Rank 2
Dario asked on 30 May 2015, 09:16 AM

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?

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 01 Jun 2015, 02:09 PM
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,
Stefan
Telerik
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
Tags
GridView
Asked by
Dario
Top achievements
Rank 2
Answers by
Stefan
Telerik team
Share this question
or