I have a sorted data grid. By default it displays everything collapsed.
By handling the InitializeRecord event in the code-behind file I can set Record.IsExpanded = true and get the grid to display everything expanded at startup.
How can I do the same thing in XAML?
Thanks,
- Dave
Hello Dave,
You can create a style for the DataRecordPresenter and add a setter for IsExpanded property to true.
You can also use a EventTrigger and use igDP:XamDataGrid.Loaded event to expand them with the same setter.
Hope this helps,
Alex.
Thanks for the quick reply!
Here's a more basic question: How do I get to the DataRecordPresenter properly?
I've implemented the example from the Help page that puts buttons in cells of a data grid.
I've created a style as follows:
<Style TargetType="{x:Type igDP:DataRecordPresenter}">
<Setter Property="IsEnabled" Value="True" />
</Style>
Shouldn't this automatically apply to all igDP:DataRecordPresenter objects in the system?
Or do I need to specify an x:Key in the Style? If so, where in the XamDataGrid definition to I reference this key?