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

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
 
I

intrepid_dw

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

-intrepid
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top