System.Data.DataTable dt = new System.Data.DataTable("Test");
System.Data.DataRow dr = default(System.Data.DataRow);
dt.Columns.Add("Series0");
dt.Columns.Add("Series1");
dr = dt.NewRow();
dr[0] = 2;
dr[1] = 1;
dt.Rows.Add(dr);
dr = dt.NewRow();
dr[0] = 4;
dr[1] = 2;
dt.Rows.Add(dr);
dr = dt.NewRow();
dr[0] = 3;
dr[1] = 4;
gcSpreadSheet1.Sheets[0].DataSource = dt;
gcSpreadSheet1.Sheets[0].DataAutoHeadings = true;
gcSpreadSheet1.Sheets[0].BindDataColumn(1, "Series0");
gcSpreadSheet1.Sheets[0].Columns[0].DataField = "Series1";
gcSpreadSheet1.Invalidate();
private void button1_Click(object sender, RoutedEventArgs e)
{
Boolean r;
Boolean c;
string colinfo;
object colinfo1;
r = gcSpreadSheet1.Sheets[0].IsRowBound(0);
c = gcSpreadSheet1.Sheets[0].IsColumnBound(0);
colinfo = gcSpreadSheet1.Sheets[0].GetDataColumnName(1);
colinfo1 = gcSpreadSheet1.Sheets[0].GetColumnDataType(1);
listBox1.Items.Add(r.ToString());
listBox1.Items.Add(r.ToString());
listBox1.Items.Add(colinfo.ToString());
listBox1.Items.Add(colinfo1.ToString());
gcSpreadSheet1.Invalidate();
}