Change Cell-Type in DataGridView

Posted 28 May 2012 - 03:22 AM

Hello everybody

I have a DataGrid that is filled out of Data retrived from a VFP-Database. My issue is that there is a Column with decimal values, that I want to convert to strings in order to write in some text. I have tried to convert te cells or the entire column to string, but it doesnt work as expected.

Replies To: Change Cell-Type in DataGridView

Re: Change Cell-Type in DataGridView

Posted 05 June 2012 - 04:01 PM

It's been a while, but I believe the correct technique is to keep the value type as Decimal, but use the FormattedValueType for display. If you need some custom formatting, you use the CellFormatting event: http://msdn.microsof...formatting.aspx

Re: Change Cell-Type in DataGridView

Posted 10 September 2012 - 03:01 AM

Thank you for your reply. I understand...

In fact my intention was to change the customers-id's with their names in the same cell, but what I afterwards did, was hiding the id-column and adding a new one with the names of my customers. --> Problem resolved