jemigossaye
asked on
Error while populating WebDatagrid: 'column' argument cannot be null.
hi all, it might be simple but i don't now what to do. I keep geting this error when i try to relate datasets. here is my code
SqlConnection StrConn = new SqlConnection(Configuratio nSettings. AppSetting s["StrConn ectionStri ng"]);
SqlDataAdapter daUnassignedData = new SqlDataAdapter("select b.company, b.Address, b.City from DMD_Data.dbo.Brokers b", StrConn);
SqlDataAdapter daUnassignedData1 = new SqlDataAdapter("select l.first_name, l.last_name,l.email_addres s from INTRANET.dbo.LO_INFORMATIO N l, DMD_Data.dbo.brokers b where b.brokers_id = l.broker_id", StrConn);
daUnassignedData.SelectCom mand.Comma ndType = CommandType.Text;
daUnassignedData1.SelectCo mmand.Comm andType = CommandType.Text;
DataSet ds = new DataSet();
daUnassignedData.Fill(ds, "brokers");
daUnassignedData1.Fill(ds, "los");
ds.Relations.Clear();
ds.Relations.Add("rel", ds.Tables["brokers"].Colum ns["broker s_id"],
ds.Tables["los"].Columns[" broker_id" ]);
this.UltraWebGrid1.DataSou rce = ds.Tables["brokers"].Defau ltView;
this.UltraWebGrid1.DataBin d();
ps. the broker_id in los dataset have null values
thanks
SqlConnection StrConn = new SqlConnection(Configuratio
SqlDataAdapter daUnassignedData = new SqlDataAdapter("select b.company, b.Address, b.City from DMD_Data.dbo.Brokers b", StrConn);
SqlDataAdapter daUnassignedData1 = new SqlDataAdapter("select l.first_name, l.last_name,l.email_addres
daUnassignedData.SelectCom
daUnassignedData1.SelectCo
DataSet ds = new DataSet();
daUnassignedData.Fill(ds, "brokers");
daUnassignedData1.Fill(ds,
ds.Relations.Clear();
ds.Relations.Add("rel", ds.Tables["brokers"].Colum
ds.Tables["los"].Columns["
this.UltraWebGrid1.DataSou
this.UltraWebGrid1.DataBin
ps. the broker_id in los dataset have null values
thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Bob