I created a DataSet and add 2 tables in.
I want a hierarchical display so I setup 2 relations in ds. The problem is only the first relation work!!!
my code:
DataSet ds = new DataSet();
oca_teamTableAdapter teamTa = new oca_teamTableAdapter();
DataTable dt = teamTa.GetData();
ds.Tables.Add(dt);
oca_userTableAdapter userTa = new oca_userTableAdapter();
dt = new DataTable();
dt = userTa.GetData();
ds.Tables.Add(dt);
ds.Relations.Add(ds.Tables
["team"].C
olumns["id
"], ds.Tables["team"].Columns[
"parent_id
"]);//self
referencing here
ds.Relations.Add(ds.Tables
["team"].C
olumns["id
"],ds.Tabl
es["user"]
.Columns["
branch"]);
UltraWebGrid1.DisplayLayou
t.ViewType
= ViewType.Hierarchical;
UltraWebGrid1.DataSource = ds.Tables["team"];
UltraWebGrid1.DataBind();
Can we apply multiple relation in ultrawebgrid? if so what is the problem here?
Cheers,
Elton
Start Free Trial