none
Xamdatagrid Cell borders are not displayed RRS feed

  • Question

  • I am trying to develop WPF application. I want to have Table inside table structure. So i have used XamDataGrid and in the field, i am using CellValuePresenter to display another table inside that cell.

    The code for Parent data grid

    <igDP:XamDataGrid Height="Auto" ScrollViewer.VerticalScrollBarVisibility="Hidden" Theme="Office2010Blue" DataSource="{Binding ParameterList}"  AutoFit="True"  BorderBrush="DarkGray" BorderThickness="0.8" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"  GroupByAreaLocation="None" ScrollViewer.HorizontalScrollBarVisibility="Hidden" >
         <igDP:XamDataGrid.FieldLayouts>
          <igDP:FieldLayout>
              <igDP:FieldLayout.Fields>
                  <igDP:Field Name="PARAMETER">
                      <igDP:Field.Settings>
                          <igDP:FieldSettings AllowEdit="False" />
                      </igDP:Field.Settings>
                  </igDP:Field>
                  <igDP:Field Name="VALUE">
                      <igDP:Field.Settings>
                          <igDP:FieldSettings AllowEdit="False"  CellValuePresenterStyle="{StaticResource downloadFileBtnStyle}" />
                      </igDP:Field.Settings>
                  </igDP:Field>               
     </igDP:FieldLayout.Fields>
    </igDP:XamDataGrid>

    I want to have another table inside the VALUE field.

    so my style looks like this

    <Style TargetType="{x:Type igDP:CellValuePresenter}"   x:Key="downloadFileBtnStyle">
            <Style.Triggers>
                <DataTrigger Binding="{Binding Path=DataItem.TABLE_DATATYPE}"  Value="True">
                    <Setter Property ="ContentTemplate">
                        <Setter.Value>
                            <DataTemplate>
                                <Grid>
                                    <igDP:XamDataGrid  x:Name="Subtbl"  VerticalAlignment="Center"    DataSource="{ Binding Path = ParameterList/TABLEDATA}"  Height="Auto" ScrollViewer.VerticalScrollBarVisibility="Visible" Theme="Office2010Blue"  AutoFit="True"  BorderBrush="DarkGray" BorderThickness="0.8" HorizontalAlignment="Stretch"   GroupByAreaLocation="None" ScrollViewer.HorizontalScrollBarVisibility="Visible" >
                                        <ContentPresenter Content="{TemplateBinding Content}"/>
                                    </igDP:XamDataGrid>
                                </Grid>
                            </DataTemplate>
                        </Setter.Value>
                    </Setter>
                </DataTrigger>
            </Style.Triggers>


    In the output i am getting parent table correctly and for the child table inside the VALUE field only values of the child table are displayed. like this

    https://drive.google.com/file/d/1nOkjRpv8JpNFXytubZOVGCanjTE89bX9/view

    I am Wondering why there are no table and cell borders inside the cell of parent XamDataGrid.

    Parent XamDataGrid is bound to observable collection called ParameterList and child XamDataGrid is bound datatable called TableData.

    Is it the issue with the content presenter?



    Friday, November 17, 2017 3:44 AM

All replies


  • Hi  Akshaykumar Vijapur,

    >>I am Wondering why there are no table and cell borders inside the cell of parent XamDataGrid.

    As far as I know, the xamDataGrid is a feature-rich Infragistics® Data Presenter family control for visualizing data in tabular form as rows and columns. 

    For your question, you need to post your question in Ultimate UI for WPF Support Center forum for getting suitable help.

    Ultimate UI for WPF Data Grid Support Center:

    Best Regards,

    Yong Lu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, November 17, 2017 7:27 AM