Hi all,
I know this subject has been discussed about but I can't seem to put my finger on the problem...
I have a grid with self referencing data. It contains one columnlayout. I would like for the header to be only visible for the first level of rows. Since the child rows are the same data and the indentation is 0, child headers are confusing and I'd like to remove them.
How?
Thanks,
Yohan
An on-line sample demonstrating this functionality is located here:
https://es.infragistics.com/samples/silverlight
The ColumnLayoutAssigned event handler is being used here to manipulate the ColumnLayout for this scenario. I hope to have a stand-alone sample ready to post here on Monday based on this sample.
Hi Francis,
Thanks for the info. Would this mean that column moving, sorting, resizing, etc. would be seperate for each ColumnLayout? If so, that would complicate things...
The data would be the same in both layouts, I just need to have a single header for all items and have expandable rows. Do you have any other suggestion?
Thanks
Hi Yohan,
Thats correct, you've have to manually sync moving, sorting, and resizing, for each additional ColumnLayout.
Although it should be possible via the events exposed for each of the features.
-SteveZ
Hi Stephen,
Thanks for confirming my worst fears... ;) Do you guys have a code example of this lying around?
I Hope this could be a future improvement for the XamGrid. Let's admit that self referencing data doesn't necessarily need to have repeating column headers if they all say the same thing. I like how the sample on the Infragistics web site is tricked so we don't see this... :)
Cheers,
Hey Yohan,
Actually, i had another idea, which you may want to try (keep in mind i haven't tried it yet)
If you use the approach of 1 ColumnLayout, you could listen to the IntializeRow event and try the following code:
void grid_InitializeRow(object sender, InitializeRowEventArgs e) { if (e.Row.Level != 0) { RowsManager manager = e.Row.Manager as RowsManager; if (manager != null) manager.HeaderRow.Height = new RowHeight(0); } }
I tried your solution... Almost! The only thing that is buggy is that the header appears momentarily and then dissapears. I'll try to figure out how to hide the row until it's header has been hidden...