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

Access the bound entity in the Format function

0 Answers 39 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ryan Haugh
Top achievements
Rank 1
Ryan Haugh asked on 14 Jul 2010, 04:12 AM
It would be very handy to be able to access the bound entity for the Format function.  I have a list of decimals that have a varying number of decimal places and my client doesn't want to show the trailing zeros.

For example,
My client would like to see:
1.12
2
3.01113

instead of:
1.12000
2.00000
3.01113

If I could do something like columns.Bound(o => o.NumberOfItems).Format(o => o.MyFunctionThatCreatesTheAppropriateFormatter()) I could do it - is there a way to do this given the current implementation?

Thanks,

Ryan
Tags
Grid
Asked by
Ryan Haugh
Top achievements
Rank 1
Share this question
or