在模板上把所有Cell的MaxLength都设置成30,然后在FormLoad加下面的代码
- private void Form1_Load(object sender, EventArgs e)
- {
- TextEditor text = (TextEditor)this.multiRowSheet1[0, 1, 0].Editor;
- text.MaxLength = 17; //把第二个Cell重置成17个字符,其他的在模板上设置成30
- this.multiRowSheet1[0, 1, 0].Editor = text;
- }
复制代码 |