请参考如下代码
- private void Form1_Load(object sender, EventArgs e)
- {
- this.multiRowSheet1.AllowUserToAddMRows = true;
- this.multiRowSheet1.MaxMRows = 1;
- this.multiRowSheet1.MRowInserted += new GrapeCity.Win.ElTabelle.MRowInsertedEventHandler(multiRowSheet1_MRowInserted);
- }
- void multiRowSheet1_MRowInserted(object sender, GrapeCity.Win.ElTabelle.MRowInsertedEventArgs e)
- {
- if (this.multiRowSheet1.MaxMRows == 9)
- {
- this.multiRowSheet1.AllowUserToAddMRows = false;
- }
- }
复制代码 |