What property controls the "format" of DataTable columns?
-
I have a DataTable (dt) with a DataColumn (dc) whose Datatype is System.Int64. I want this column to display the 64 bit Int in Hexadecimal format, as if the number had been converted like
Int64Data.ToString("X")
. What property of a column controls this display? There's no "format" property for a column, and "Expression" appears to be for aggregation. It's important that the column datatype remain INT64 (and not string), or I would just do the formatting conversion myself. Can somebody point me to the correct method for setting the column display formatting? Thanks. -
I have a DataTable (dt) with a DataColumn (dc) whose Datatype is System.Int64. I want this column to display the 64 bit Int in Hexadecimal format, as if the number had been converted like
Int64Data.ToString("X")
. What property of a column controls this display? There's no "format" property for a column, and "Expression" appears to be for aggregation. It's important that the column datatype remain INT64 (and not string), or I would just do the formatting conversion myself. Can somebody point me to the correct method for setting the column display formatting? Thanks.Doh. Of course. You don't format the display of a DataTable DataColumn, because it's never displayed. You format the display of the column in the DataGridView, in which the DataTable data is displayed. Man, you don't do any table stuff for a year, and you forget everything.
-
Doh. Of course. You don't format the display of a DataTable DataColumn, because it's never displayed. You format the display of the column in the DataGridView, in which the DataTable data is displayed. Man, you don't do any table stuff for a year, and you forget everything.