客户提出了一个这样的需求,大致中文意思是在一个datagridview中的单元格内自定义textbox 格式。英文文档需求如下:
Page 53 of Specification
1.1. Category (scenario_assump_cat): Multi-Line Textbox
1.1.1. Displays the category for this assumption.
1.1.2. This textbox auto-sizes vertically up to a maximum of three lines. If the text exceeds three lines a vertical scrollbar will appear.
1.2. Description (scenario_assump_desc): Multi-Line Textbox
1.2.1. Displays the description for this assumption.
1.2.2. This textbox auto-sizes vertically up to a maximum of three lines. If the text exceeds those three lines a vertical scrollbar will appear.Category ,Description 是其中的两个column,这两列columns要能实现多行编辑,如果输入超出3行,要显示vertical scrollbar!我估计要重写控件,又没有可供下载的高级datagridview控件?  最好是用微软自带的datagridview控件完成设置,实现客户要求的功能!请高人指点,谢谢!

解决方案 »

  1.   

    参考
    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=70746&SiteID=1
      

  2.   

    谢谢net lover. 你的参考对我很有价值,再次感谢。 其实我想问的关键是 怎么使This textbox auto-sizes vertically up to a maximum of three lines. If the text exceeds three lines a vertical scrollbar will appear. 
    就是在Datagridview 的某个单元格中输入字符,超过规定的字数后换行,当达到设定的最大三行后出现竖直滚动条。如何具体实现呢?赐教!