I am retrieving data from an Oracle database and binding the same to a gridview control.
I noticed that there are instances when the column contains a single quote or double quote, the spaces or whitespace characters get stripped off.
Sample of some data in fields in Oracle:
To Be Phased Out ASAP ' ",
When retrieved, it becomes...
To Be Phased Out ASAP ' ",
And another one...
IT''S TEST RECORD" DDD " FFF
which becomes
IT''S TEST RECORD" DDD " FFF
I don't have any clue why this is happening...
any ideas?
I think even here the spaces are getting trimmed. In my example in the first field which is:
To Be Phased Out ASAP ' "
there are actually two spaces after the single quote but it is displaying just a single space here.. Odd...
single quote space space double quote --> ' "
I think the extra space after a quote or single quote is being removed by asp.net??
I also found out that when I am editing my gridview, the extra white spaces are retained but when I go back to the original view, the whitespaces are gone.
To rephrase this question..
How Do I Preserve the WhiteSpace in the gridview when displaying the data?