Hi,
So far, i have seen samples that shown hierarchical ultrawebgrid bind by dataset (using data relation).
How do i bind TList to hierarchical grid and how do i set the relation?
I'm using code smith generated code. any ideas?
Thanks!
Hello,
This is easy as well - just make sure you have something similar to this (the child collection needs to be a TList as well)
public class Docs{ public string Name { get; set; }}public class Budget{ public string BName { get; set; } public List<Docs> Dox { get; set; }}
this.UltraWebGrid1.DisplayLayout.ViewType = Infragistics.WebUI.UltraWebGrid.ViewType.Hierarchical; List<Budget> list = new List<Budget>(); Budget b1 = new Budget() { BName = "1999", Dox = new List<Docs>() }; list.Add(b1); Budget b = new Budget() { BName = "2000", Dox = new List<Docs>() }; Docs d = new Docs() { Name = "Bob" }; b.Dox.Add(d); list.Add(b); this.UltraWebGrid1.DataSource = list; this.UltraWebGrid1.DataBind();
For more information, please take a look at the following forum thread:
http://forums.infragistics.com/forums/t/18040.aspx