|
-
Jan 5th, 2011, 05:06 AM
#1
DGV not showing text in cell
I've got an unbound DGV with several columns that I am programmatically adding rows to. All working fine, apart from when I try to set a really long string in one of the cells, then that cell just appears blank. The string IS in the cell because if I select the cell and do this:
vb.net Code:
My.Computer.Clipboard.SetText(CStr(OutputDGV.SelectedCells(0).Value))
then the string gets copied to the clipboard and I can paste it into Notepad or whatever without a problem. So it is just purely a display issue... but it doesn't seem to make any difference if I resize the cell (horizontally or vertically) and I can't understand why it is doing this.
The string in question is roughly 7000 characters long, where as strings that are about 400 characters long are displaying fine. I know you are going to say surely you don't need to have 7000 characters in a DGV cell, but this is a reporting application and I'm at the mercy of the data in the database I am querying (which I have no control over) and whilst the majority of the time only very short strings will be loaded from the database, I have to be able to handle scenarios where a large amount of data is there. I don't care if the string gets truncated in the DGV or something (as I have an option to export the DGV contents to CSV, TXT, or HTML) but its just the fact that the cell appears to be completely empty that is a problem.
Any ideas?
Thanks
Chris
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|