VS2005下MSHFlexGrid使用出错!
程序代码:
int j = 1,k=6; Redata.Col = 1; //ReData是MSHFlexGrid控件 Redata.Text = "偏角"; Redata.Col = 2; Redata.Text = "弦长"; Redata.Row = 1; Redata.Col = 0; Redata.Text = "ZY"; Redata.Col = 1; Redata.Text = b[0].ToString(); Redata.Col = 2; Redata.Text = b[1].ToString(); Redata.Row = 2; Redata.Col = 0; Redata.Text = "QZ"; Redata.Col = 1; Redata.Text = b[2].ToString(); Redata.Col = 2; Redata.Text = b[3].ToString(); Redata.Row = 3; Redata.Col = 0; Redata.Text = "YZ"; Redata.Col = 1; Redata.Text = b[4].ToString(); Redata.Col = 2; Redata.Text = b[5].ToString(); for (Redata.Row = 4;b[k]!=0d ; Redata.Row++) //Redata.Row++,这里应该也会报错,为何? { for (Redata.Col = 0;Redata.Col<3; Redata.Col++) //Redata.Col++,这里报错,为何? { if (Redata.Col == 0) { Redata.Text = j.ToString(); } else { Redata.Text = b[k].ToString(); k++; } } j++; }