我想在代码中添加新行时出错;有一个类型错误voint to int。
问题行:clmm = gridView1.AddNewRow();
这里是我的代码;
namespace sensor_measure
{
public partial class Form1 : Form
{
int clmm= 1;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
serialPort1.Close();
DateTime new= DateTime.Now;
}
private void button1_Click(object sender, EventArgs e)
{
serialPort1.PortName = "COM3";
serialPort1.Open();
timer1.Enabled = true;
}
private void timer1_Tick(object sender, EventArgs e)
{
timem= (timem+ 1);
come = serialPort1.ReadLine();
this.chartControl1.Series["Veri"].Points.Add(new SeriesPoint(timem, come));
clmm=gridView1.AddNewRow();