Hi,
I'm binding a XamWebGrid to some data and using a ColumnLayout.
I managed to get a button to expand all rows by iterating through them and calling IsExpanded=True. That works perfectly fine.
My issue is that I want the grid to start in the expanded state. I tried to find a decent "end of binding" event but couldn't find any. I hooked up on the Rows.CollectionChanged and the event gets fired OK.
However, when I iterate through the rows and set their expanded state to true, they are shown as expanded (arrow pointing downwards) but don't display the data.
If I click on them and collapse/expand them, then the data is displayed OK. I guess there's a timing issue or something and the expansion event isn't yet registered on the row when I expand it in code.
Is there any way of achieving the "start as expanded" behaviour?
PS: I only have one ColumnnLayout in the view
PPS: the collection to which I bound the grid sends the Reset event and not Add.
Cheers.
There is also an Initializerow event where the row could be set to be expanded.
Thanks. That's exactly what I was looking for.
I completely overlooked it.
InitializeRow is firing only for the root parent rows. How can I expand the nested rows? (Rows in multiple level column layout)? I'm using Infragistics.Silverlight.XamWebGrid.v9.2
Thanks,Pragati.
Hello Pragati,
I have created a sample project for you where I set the Row’s IsExpanded Property to true in the InitializeRow event, which cause all Rows to be expanded when the XamGrid loads.
Hope this helps you.
Hello Stefan,Thanks for the reply. Though my scenario is different than the example you given, still it helps me. In your example, the data is ready with parent -child relation. In my case, I load the child data either on cell click or on expander click. I was expecting to get that event, when the children rows in child band are created. Anyways, the use of observable collection gives me a clue for my scenario. Thanks again.Pragati.