Hi,
I'm trying to add a simple control (button) to the XamDataGrid footer. I tried to style the SummaryResultsPresenter with no luck.
Any idea how to achieve that ?
Thank you
Hello, I just wanted to clarify that column summaries, calculator's, etc. do not need to be enabled for the SummaryDefinition to allow the footer to appear. A single summary definition (without any purpose) will trigger the footer to display. So yes, it is correct to use a Summary Defintion to show the button.
Let me know if you require further assistance or have any additional questions.
Hello Michael,
You mentioned that Summaries do not need to be enabled or added to utilize this approach.
I couldn't make the button to appear without a SummaryDefinition.
Hello,
Summares do not need to be enabled or added to utilize this approach but it is considered a work around since there isn't a footer. I recommend modifying the grid's default template to customize your own footer area or use a UserControl to extend the XamDataGrid.
I recommend modifying the XamDataGrid's default style to add your button without neededing a summary definition. You can create your own custom control template based on the styles in the following location.C:\Program Files\Infragistics\NetAdvantage 20xx.x\WPF\DefaultStyles\DataPresenter
Let me know if you have any questions.
Michael,
I'm not using this button to display or generate sums or counts. I'm using this button as a command button that will start a certain process.
Using this method requires a Summary Definition for each grid.
Thank you for following up. You can move the style higher up to the container's resources or the window, which ever you prefer. It should behave the same way as if it were placed in a single grid instance.
eg.
<Window.Resources>
<Style TargetType="{x:Type igWPF:SummaryRecordPresenter}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate> <Button Height="25"></Button> </ControlTemplate> </Setter.Value> </Setter> </Style>
</Window.Resources>