Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
725
Horizontal Alignment applied to right on Data Record Presenter for 3rd level is not affect in XamReportPreview
posted

Hello I want to preview my selected record having 3 level hierarchical xamdatagrid with style.

here is my code for last fieldlayout 

<igDP:FieldLayout Key="lastDetail" Settings="{StaticResource lastDetailFieldLayoutSettingsKey}">
<igDP:UnboundField Width="145" Name="DateTime" Binding="{StaticResource bindEventDateTimeKey}"></igDP:UnboundField>
<igDP:UnboundField Name="IsReset" Width="145"></igDP:UnboundField>
</igDP:FieldLayout>

<Style x:Key="lastDetailDataRecordPresenterKey" TargetType="igDP:DataRecordPresenter">
           <Setter Property="HorizontalAlignment" Value="Right"></Setter>
           <Setter Property="Margin" Value="0,0,60,0"></Setter>
           <Setter Property="MaxHeight" Value="100"></Setter>
</Style>
<Style x:Key="lastDetailDataRecordCellAreaKey" TargetType="igDP:DataRecordCellArea">
           <Setter Property="Background" Value="White"></Setter>
           <Setter Property="BackgroundAlternate" Value="#EEEEEE"></Setter>
           <Setter Property="BorderThickness" Value="0"></Setter>
           <Setter Property="Margin" Value="0"></Setter>
          <Setter Property="CornerRadius" Value="0"></Setter>
</Style>

<igDP:FieldLayoutSettings x:Key="lastDetailFieldLayoutSettingsKey" LabelLocation="Hidden" DataRecordPresenterStyle="{StaticResource lastDetailDataRecordPresenterKey}" DataRecordCellAreaStyle="{StaticResource lastDetailDataRecordCellAreaKey}"></igDP:FieldLayoutSettings>

It is worked in xamdatagrid fine but when i am preview this in report last level HorizontalAlignment is not to right side.

here is my code : 

this.previewGrid.DataSource = boxCollection;
this.previewGrid.Records.ExpandAll(true);

Report reportObj = new Report();

EmbeddedVisualReportSection section = new EmbeddedVisualReportSection(this.previewGrid);
reportObj.Sections.Add(section);

XamReportPreview1.GeneratePreview(reportObj, false, false);

Please give me some idea on this. Here i attached snapshot. 

1) upper section will show my actual grid (3 level)

2) lower section will show print preview of that grid

Thanks 

Adit Sheth