c#devexpress数据网格添加行转换类型错误
我想在代码中添加新行时出错;有一个类型错误voint to int 问题行:clmm=gridView1.AddNewRow() 这是我的密码c#devexpress数据网格添加行转换类型错误,c#,datagridview,devexpress,C#,Datagridview,Devexpress,我想在代码中添加新行时出错;有一个类型错误voint to int 问题行:clmm=gridView1.AddNewRow() 这是我的密码 namespace sensor_measure { public partial class Form1 : Form { int clmm= 1; public Form1() { InitializeComponent(); }
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();
声明如下:
public override void AddNewRow()
并且有一个
void
返回类型。您是否尝试了gridView1.Rows.Add()
?我不知道有一个叫做AddNewRow
的方法,这对DevExpress无效。在我看来,在GridView.AddNewRow()上进行简单的谷歌搜索将是一个很好的开始,更不用说DevExpress有大量在线工作示例