© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago
PurelyAndy

DataGridViewCell won't display line breaks properly when editing

I'm trying to put multiple lines in this DataGridViewCell, but when I edit the value, the line breaks disappear, seemingly because they get converted into \n when the cell's value is set rather than staying as \r\n. How can I fix this? This is .NET 4.7.2 WinForms. If I could use WPF and/or a more modern .NET version, I would.
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

DataGridViewCell won't display line breaks properly when editing
C#CC# / help
2y ago
Nuget packages won't restore properly when building in docker when using custom nuget feed
C#CC# / help
3y ago
✅ Wpf app won’t load when published
C#CC# / help
13mo ago
✅ How can i properly display this datagridview
C#CC# / help
4y ago