Hello, is there a possibility for displaying a header and footer in the nested Grid of the DataPresenter?
Could you please give me an example.
I will show in the footer a summary of the records of the grid.
Grid:
12 68 65Footer of Grid:25 12
Rgds.
Hello,
Is the Summaries functionality of DataPresenter suitable or do you need something different?
Regards
Ivan
Hi, i would like to show some values, which are not calculated of the grid, but these values are in the Datasource. How to put in the footer a new grid or expand the rows with new values in the footer?
I tested the SummaryDefinitions it works well, but need some custom data which i will print in the footer.
You might achieve that with a custom style for the SummaryResultPresenter where you can override the default template. However, it would be easier if you create a custom summary calculator.
For more information look at the following samples in the FeatureBrowser:
xamDataGrid-->Row Summaries-->Custom Summary Calculators
xamDataGrid-->Row Summaries-->Custom Button in Summary Template
Let me know if this is what you are looking for.
thanks for reply, is there a way to set a Header about specific columns? I just posted this question here:
http://community.infragistics.com/forums/t/49951.aspx
For the headers you could create a style for the LabelPresenter and set it on particular field via FieldSettings.LabelPresenterStyle.
Let me know if you have any questions on this thread.
Hi i tried you method, but i have some questions:
I set a LabelPresenter which some Properties like color, it works, but how can i define a new Layout for the Header. Over the Field must be added some controls and i don´t know how to this`?
Can i define a Style in XAML code and use it in the Codebehind and how to access from Codethe Style?
Here my actual Code:
void xamDataPresenter1_FieldLayoutInitialized(object sender, Infragistics.Windows.DataPresenter.Events.FieldLayoutInitializedEventArgs e) { foreach (Field field in xamDataPresenter1.DefaultFieldLayout.Fields) { if (field.Name == "Col1" || field.Name == "Col2") { field.Settings.LabelPresenterStyle = _labelPresenter; }}}
In order to include other controls into the header, you will have to modify the default template of the LabelPresenter element. We recommend to copy and paste the default style for the LabelPresenter and then make any modification to it in order to keep the default functionality of the control. You could define the styles into the resources in Xaml and access tham using their keys in Codebehind.
I've created a sample project that illustrates this. There are three styles defined into the generic.xaml resource dictionary which are later merged into the main grid's resources. I set each of tham to the fields of the grid.
Let me know if you have any quesitons with this matter.