You might need to define the table “results” before attempting to use it.
HTH
From: "livingstonmh@..." <livingstonmh@...>
To: "vantage@yahoogroups.com" <vantage@yahoogroups.com>
Subject: [Vantage] Binding grid to new dataset
Date: Wed, Dec 11, 2013 11:15 AM
I created a grid that when a field is selected in another grid I want to add that value to the new grid.
DataSet call;
call = new DataSet("Results");
DataRow newRow = call.Tables["Results"].NewRow();
int i = this.grdcallselected.Rows.Count;
newRow[0] = nextList;
call.Tables["Results"].Rows.Add(newRow);
call.Tables["Results"].AcceptChanges();
this.grdcallselected.DataSource= call.Tables[0];
I am getting an error when the code hits DataRow newRow = call.Tables["Results"].NewRow();
Object not set to an instance. Anyone have any ideas?