C# 在datagrid中添加其他行和计算数据
当前,此代码为每个顶点创建并填充一行。我如何在已经创建的每一行下添加另一行,比如说…position.x++position的值?简单地添加空行是一件容易的事情。填充它是另一项任务C# 在datagrid中添加其他行和计算数据,c#,C#,当前,此代码为每个顶点创建并填充一行。我如何在已经创建的每一行下添加另一行,比如说…position.x++position的值?简单地添加空行是一件容易的事情。填充它是另一项任务 foreach (AcDb.ObjectId vertexId in poly) { if (!vertexId.ObjectClass.IsDerivedFrom(vertexClass)) continue; var vertex = (AcDb.Polyl
foreach (AcDb.ObjectId vertexId in poly)
{
if (!vertexId.ObjectClass.IsDerivedFrom(vertexClass))
continue;
var vertex = (AcDb.PolylineVertex3d)trans.GetObject(vertexId, AcDb.OpenMode.ForWrite);
System.Data.DataRow dr = vertexTable.NewRow();
dr.ItemArray = new object[] { vertex.Handle.Value, vertex.Position.X, vertex.Position.Y, vertex.Position.Z } ;
vertexTable.Rows.Add(dr);