P
Piotr Karwatka
Hi!
I need to do relation beetwen one table (task 2 task) and i do something
like that"
DataSet data = new DataSet();
myCommand.Fill(data);
// i fill my data adapter with one query like: SELECT * FROM Zadanie....
data.Tables[0].TableName = "Zadanie";
//data.Tables[1].TableName = "Zadanie";
string relName = "Taks2Tasks";
DataRelation rel = new DataRelation(relName,
data.Tables["Zadanie"].Columns["IdZadania"],
data.Tables["Zadanie"].Columns["Zadanie_IdZadania"]);
data.Relations.Add(rel);
DataGrid1.DataSource=data;
DataGrid1.DataBind();
And that makes an error: System.ArgumentException: This limit cannot be
switched on because not all values have parent values - and thats right not
all tasks have parent tasks but that the specific of problem is. So What I
should to do?
Thanks for excpetion!
I need to do relation beetwen one table (task 2 task) and i do something
like that"
DataSet data = new DataSet();
myCommand.Fill(data);
// i fill my data adapter with one query like: SELECT * FROM Zadanie....
data.Tables[0].TableName = "Zadanie";
//data.Tables[1].TableName = "Zadanie";
string relName = "Taks2Tasks";
DataRelation rel = new DataRelation(relName,
data.Tables["Zadanie"].Columns["IdZadania"],
data.Tables["Zadanie"].Columns["Zadanie_IdZadania"]);
data.Relations.Add(rel);
DataGrid1.DataSource=data;
DataGrid1.DataBind();
And that makes an error: System.ArgumentException: This limit cannot be
switched on because not all values have parent values - and thats right not
all tasks have parent tasks but that the specific of problem is. So What I
should to do?
Thanks for excpetion!