I am using DataGridView component in Windows Forms .Net. How to break line into column? “\n\r” doesn’work.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Edit the column, edit the DefaultCellStyle property and set the WrapMode property to True. And change the DGV’s AutoSizeRowMode to, say, AllCells so that a row automatically grows in height to fit the text. The text in the column header and the cells will now automatically word-wrap. You can use “\n” to force an early wrap.