开发者

cell of a datagridview to support multiple lines using c#

i have a datagrid view with two columns. the first column is readonly and the other is edit开发者_开发百科able. now i want every cell of the second column to support for mulitilines in each cell. i want to press enter key and come to the next line in the same cell. im using c#.


Try replacing newlines with HTML break-tags:

var helloWorld = @"Hello
World";

// helloWorldHTML will contain "Hello<br />World";
var helloWorldHTML = helloWorld.Replace(System.Environment.NewLine, "<br />");
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜