Need *formatted* value from WinForm DataGrid control...possible?

  • Thread starter Thread starter intrepid_dw
  • Start date Start date
I

intrepid_dw

Hello, all.

I have a Windows Forms app with a datagrid control, with several custom
column styles applied. One of the columns holds a decimal data type,
with a format string of "C" for currency, and this works precisely as
intended, eg the value 1234.56 is formatted as $1,234.56.

In another portion of the application, I need to get the *formatted*
rendering of that value from the grid, not the underlying value. I've
tried the simple grid[row,col] syntax, but it merely returns the
underlying value. My intent is to measure the width of the formatted
string to autosize the width of the column, and what I have now only
formats the raw data, and that won't work.

Is what I need even possible? I've gone through the DataGrid FAQ and
MSDN and not found what I'm needing, so I'm turning here for help.

Many thanks in advance,
-intrepid
 
Please accept my apologies - I did not intend to post this in the
ASP.NET newsgroup. Will re-post correctly.

-intrepid
 
Back
Top