Hi,
Need a suggestion to bind hierarchical win grid data from list at runtime only for exporting to excel.
Infragistics version we are using is 13.1
Thank in advance.Any help would be highly appreciated with a working example.
Hello ,
You should structure your classes hierarchy like:
private void Form1_Load(object sender, EventArgs e) { A a = new A {Id = 1}; B b = new B {Name = "b1", ParId = 1}; a.Coll = new BindingList<B>{b}; ultraGrid1.DataSource = new BindingList<A> { a }; B b2 =new B{Name = "b2", ParId = 1}; B b3 = new B { Name = "b3", ParId = 1 }; a.Coll.Add(b2); a.Coll.Add(b3); } public class B { public int ParId { get; set; } public string Name { get; set; } } public class A { public int Id { get; set; } public BindingList<B> Coll { get; set; } }
Please let me know if you have any further questions.
Hi Thanks for the prompt reply,
the grid is getting binded I can see the data source is assigned but we are not able to export this at runtime.
Need a code where we can export this runtime binded grid in excel export.