I have a XamWebGrid bound to a collection of objects and displaying summary information in the grid. I have a single "Details" string property, which contains detailed (i.e. multiple lines of text) information about the item.
Ideally, I would like to have an "expand" button in the row which, when clicked, opens up a multi-line detail block below the row. Clicking again collapses the item.
Any hints on how to achieve this effect using XamWebGrid?
Thanks.
You can achieve this using the TemplateColumnLayout feature. For more details you can refer to our online documentation.
Let me know if you have any questions with this matter
Thanks; this does 90% of what I want. Expansion icon; template for data; all looks good.
Now the 10% question: not all rows have details. Sometimes the details are blank or null. At the moment, I get an expansion indicator and then blank text area. I could obviously tie a visibility ValueConverter to map blank/null details to set the visibility of the details template content to Collapsed, but would this suppress the expansion icon? Is there programmatic control over the expansion icon on a row-by-row basis?
Again, thanks for info so far.
Hi,
I don't think there is any property available for controling the Visibility of each expansion indicator but you can check out the attached sample project for one resolution using converter for the ExpansionIndicator.Width.
I hope this helps
In the InitializeRow, event you can set the IsExpanded property on the row to true.
Hope this helps,
-SteveZ
Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4
How do I expand the TemplateLayoutColumns as a default. Means users do not have to lick to show the TemplateLayoutColums