Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Datagridview non printable characters

Status
Not open for further replies.

prrm333

Programmer
Apr 14, 2003
97
0
0
US
I use the following to load a datagridview from a SQl database:

SqlConnection cn = new SqlConnection(sConn1);
SqlDataAdapter da = new SqlDataAdapter("Select * from table", cn);
DataSet ds = new DataSet();
da.Fill(ds, "web_trans");
dataGridView1.DataSource = ds.Tables["web_trans"];
cn.Close();

I then have a function that a user can select a button and send the entire row to the clipboard. In this everything works fine.

Except for some of the rows have the square non printable/carriage return characters in them. When the copy to clipboard function loops through and gets to this column the remaining columns are not copied to the clipboard.

How can I get around this?
 
Could you not post the code you are using / some dummy data. Then we might be able to shed some light!

Regards,

Martin

Computing Design And Services:
 
I'm not sure what the concern is about my posting. The only thing not there is the full query as it's too long but it is basically as I posted a select * from the table. Everything else is exactly the code I am using.
 
how do you exactly copy the "entire row" in to the clipboard?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top