开发者

How to paste multi-lined and tabulated text into DataGridView?

I'm trying to copy and paste Multi-lined and tabulated DataGridView cell strings into other cells (DataG开发者_运维技巧ridViewTextBoxColumn). For example I would like to copy one column of text into another column. The problem I encounter is that the single cell can contain multi-lined and tabulated text which makes it imposible to distinguish between DataGridView rows and columns. Any ideas how to accomplish this?


If you mean 'distinguish visually', try changing the AlternatingRowsDefaultCellStyle background color to something else. This should distinguish the rows.

Also, if you set DefaultCellStyle.WrapMode to False it will display the multilined strings nicely.


So, what exactly are you trying to accomplish? Copying from one cell to multiple cells could be done by dividing between multiple entries. Whatever way you want to go, you have to achieve some clearance on how and where to seperate the data.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜