DataGridView WordWrap
-
Iam developing a windows application. I have a dataGridView which has rows. Inside a row in dataGridView i kept two lines. For doing this i first did dataGridView1.DefaultCellStyle.WrapMode = DataGridViewTriState.True; and kept a new line character in the string so if i have Mike and Bond to go in separate lines inside one row in dataGridView i would say "Mike"+"\n"+"Bond" it worked and kept in separate lines but when i double click on the DataGridView row for some weird reason its again keeping back in single line with some funny character between Mike and Bond But when i leave the row it again puts back in two separate lines. Did any body encountered this if yes how to solve this. I want them in Separate line always. Thanks Kal
-
Iam developing a windows application. I have a dataGridView which has rows. Inside a row in dataGridView i kept two lines. For doing this i first did dataGridView1.DefaultCellStyle.WrapMode = DataGridViewTriState.True; and kept a new line character in the string so if i have Mike and Bond to go in separate lines inside one row in dataGridView i would say "Mike"+"\n"+"Bond" it worked and kept in separate lines but when i double click on the DataGridView row for some weird reason its again keeping back in single line with some funny character between Mike and Bond But when i leave the row it again puts back in two separate lines. Did any body encountered this if yes how to solve this. I want them in Separate line always. Thanks Kal
Hello To solve this issue either use
"Mark\r\nBond"
, or"Mark" + Environment.NewLine + "Bond"
Regards:rose: