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. I've tried the simple
grid[row,col] syntax, but it merely returns the underlying value, but I
need the resultant value after the column style is applied. My ultimate
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 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. I've tried the simple
grid[row,col] syntax, but it merely returns the underlying value, but I
need the resultant value after the column style is applied. My ultimate
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