I am creating a Log Grid where I have a set of rows in the Band[0] and for each row in this band there is a ChildBand with additional rows.
The code is the same of your tutorials ...
_gds = new UltraDataSource();
_gds.Band.Columns.Add("Id", typeof (Guid));
_gds.Band.Columns.Add("Type", typeof (string));
_gds.Band.Columns.Add("CreatedDate", typeof (DateTime));
_gds.Band.Columns.Add("CreatedUser", typeof (string));
_gds.Band.Columns.Add("PayoutCaption", typeof (string));
_gds.Band.Columns.Add("Message", typeof (string));
_gds.Band.ChildBands.Add("DetailBand").Columns.Add("Data", typeof (string));
foreach (MYLOG vo in _items)
{
UltraDataRow row = _gds.Rows.Add();
row["Id"] = vo.Id;
row["Type"] = vo.Type.ToString();
row["CreatedDate"] = vo.CreatedDate;
row["CreatedUser"] = vo.CreatedUser;
row["PayoutCaption"] = vo.PayoutCaption;
row["Message"] = vo.Message;
if (!string.IsNullOrEmpty(vo.Data))
var childRows = row.GetChildRows("DetailBand").Add();
childRows["Data"] = vo.Data;
}
I don't see anything wrong with this code. It looks like it should work.
I am assuming, of course, that you are binding the grid to _gds. If not, you would not see the parent band, either, so I'm pretty sure that's a safe assumption.
There are a couple of properties on the grid that would prevent it from displaying child bands. You might want to check to see if you are setting the ViewStyle on the grid to Single or the MaxBandDepth to 1.
If that doesn't help, then I'm out of ideas. Can you post a small sample project demonstrating the issue? If so, I would be happy to take a look at it and tell you why it's not working.
Ok, I changed the MaxBandDepth to 3 and the ViewStyle to MultiBand and the ViewStyleBand to OutlookGroupBy and now it works great.
I believe it was the combination of these three properties.
Thank you so much!!