Hi,
I have a Parent object (Budget class) with collection (implements IEnumerable) of its child elements (Documents).
class Budget {...IList<Document> documents;public IList<Document> Documents { get { return documents; } };...}
class Document {...string name;public string Name { get { return name; } }}I try to bind a collection of budget items to the grid so that the documents appear in the next child band. In the code behind I wrote:
protected void MainGrid_InitializeBand(object sender, Infragistics.WebUI.UltraWebGrid.BandEventArgs e) { if (e.Band == MainGrid.Bands[1]) { e.Band.ChildBandColumn = "Documents"; } }
Am I doing something wrong here? Could you please provide asp code that I should use in my MainGrid declaration so that this code starts working? Should I have 2 Bands elements declared or only one? May I add columns to this bands and how should they be declared?Thanks in advance for your help,Sebastian
OMG this totally fixed my problem. I have a collection of objects that each have their own child collections. Using the ChildBandColumn I was able to tell each parent grid row which child collection to display as its children. I am so happy about this.
Now, If they could just allow multiple sibling bands to have different objects bound.
I'd suggest you to try it out with the latest hot fix that was released at the end of March. If the issue still persists for your case, please report it to the dev support.
Thank you.
Hi Darrell Kress,
You mentioned about a problem you had before when the parent node has no child, it doesnt bind to that level. I am encountering the same problem now. I have a self-referencing table bound to a dataset which has a relationship. I am binding this dataset to the Ultrawebgrid control. If the first row has a child, the succeeding rows display correctly. However, if the first row doesnt have any child, the succeeding rows only display data up to 2nd level. The child nodes of the 2nd level are not display anymore. Do you have a fix on this?
Jhoanna
Thank's