Hello,
I have a situation where I need to format decimal numbers in a grid to Feet and Inches. ie: 2.5 = 2' 6" I have an extension written to the decimal type that takes care of this, and it works fine. However, now we are getting into wanting to sort, and sum, etc.. I implemented custom aggregates that work fine, but the code is getting more and more convoluted. I am taking a step back, and it seems that if I could just implement a custom IFormatProvider and use the formatting within the grid control DataFormatString that all my problems would go away. I was thinking something like DataFormatString="fi{0}" and within my format provider, I could check that it starts with "fi" and format it the correct way.
Is this even possible, or am I barking up the wrong tree?
Thanks
Lance
I have a situation where I need to format decimal numbers in a grid to Feet and Inches. ie: 2.5 = 2' 6" I have an extension written to the decimal type that takes care of this, and it works fine. However, now we are getting into wanting to sort, and sum, etc.. I implemented custom aggregates that work fine, but the code is getting more and more convoluted. I am taking a step back, and it seems that if I could just implement a custom IFormatProvider and use the formatting within the grid control DataFormatString that all my problems would go away. I was thinking something like DataFormatString="fi{0}" and within my format provider, I could check that it starts with "fi" and format it the correct way.
Is this even possible, or am I barking up the wrong tree?
Thanks
Lance