I am attempting to build a text report from data that is loaded into a GridView.
The GridView is populated from a DataTable which is filled with data from a query.
Each column is required to be a fixed number of spaces or characters.
The problem that I am having is there are a few columns in the DataTable that contain
white space place holders where data in the text report is not available or is not needed.
I still need to keep the white space in there so that the report stays in the correct format.
When I build the DataTable, I can view it and see that the required columns contains the white space that I need.
When I pass the data from the DataTable to the GridView, the GridView ignores or deletes the white space,
and the format for the report is now incorrect.
Example:
@ = white space
DataTable
C1 C2 C3 C4 C5
----------------------------------
01 01 2012 @@@@ 01
01 02 2012 @@@@ 01
GridView
C1 C2 C3 C4 C5
----------------------------------
01 01 2012 01
01 02 2012 01
I need to know if there is a way to tell the GridView not to delete the white space?
Or if there is a better way to do what I am trying to do.
Thanks,
Chilly442
---------------------------------------
The GridView is populated from a DataTable which is filled with data from a query.
Each column is required to be a fixed number of spaces or characters.
The problem that I am having is there are a few columns in the DataTable that contain
white space place holders where data in the text report is not available or is not needed.
I still need to keep the white space in there so that the report stays in the correct format.
When I build the DataTable, I can view it and see that the required columns contains the white space that I need.
When I pass the data from the DataTable to the GridView, the GridView ignores or deletes the white space,
and the format for the report is now incorrect.
Example:
@ = white space
DataTable
C1 C2 C3 C4 C5
----------------------------------
01 01 2012 @@@@ 01
01 02 2012 @@@@ 01
GridView
C1 C2 C3 C4 C5
----------------------------------
01 01 2012 01
01 02 2012 01
I need to know if there is a way to tell the GridView not to delete the white space?
Or if there is a better way to do what I am trying to do.
Thanks,
Chilly442
---------------------------------------