日期:2014-05-18 浏览次数:20894 次
private void radioButton4_CheckedChanged(object sender, EventArgs e) { if (radioButton4.Checked) { //表格设计(单元格合并、计算、绘制图片等) } else { //表格初始化 }
if (Manual.ShowDialog() == DialogResult.OK) { binddata();//重新刷新 radioButton4_CheckedChanged(radioButton4, null); }
radioButton4_CheckedChanged(radioButton4, null);你这句都执行了radioButton4_CheckedChanged事件,直接是在表格设计,,表格根本没没有初始化,,,, private void radioButton4_CheckedChanged(object sender, EventArgs e) { if (radioButton4.Checked) { //表格设计(单元格合并、计算、绘制图片等) } else { //表格初始化 } }
------解决方案--------------------
radioButton4.checked=true;
radioButton4_CheckedChanged(null, null);
试试看