I want to display the a child table inside a xamdatagrid.
<igDP:XamDataGrid DataSource="{Binding DataContext.ViewSetList,RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:MainWindow}} }" > <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" /> </igDP:Field.Settings> </igDP:Field>
</igDP:FieldLayout.Fields>
</igDP:FieldLayout> </igDP:XamDataGrid.FieldLayouts>
</igDP:XamDataGrid>
I want to bind this <igDP:Field Name="VALUE" > field to another another data table. Is there any possible solutions
Hi Nick,
Thanks for the clarification.
I have changed the code based on your suggestion.
<Style TargetType="{x:Type igDP:CellValuePresenter}" x:Key="TableData"> <Style.Triggers>
<DataTrigger Binding="{Binding Path=DataItem.IsTableData}" Value="True"> <Setter Property="ContentTemplate"> <Setter.Value> <DataTemplate> <!--<ControlTemplate TargetType="{x:Type igDP:CellValuePresenter}">--> <igDP:XamDataGrid DataSource="{Binding Path = ViewSetList/TableData, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:MainWindow}} }" /> <!--</ControlTemplate>--> </DataTemplate> </Setter.Value> </Setter> </DataTrigger> </Style.Triggers> </Style>
But still seeing same blank field
Hello AKshay,
Thank you for the sample you have sent. It was very helpful to observe the functionality you want to achieve.
In order to display the table inside the Field if the value of the IstableData = True, you will have to use a different binding for the Data Trigger. For example:
<DataTrigger Binding="{Binding Path=DataItem.IsTableData}" Value="True">
As in the previous examples it depends on the Context you are currently using and the binding. The cell wraps the values from the data source for an associated Field for a specific DataRecord. It is represented in the UI by corresponding CellValuePresenter. Each DataRecord has a DataItem which in your scenario is Parameters.
Any update on this ?
Thanks
AKshay
Thanks For the reply. But it is not theme issue.
I am attaching the Project. I am using Data Trigger to check the value of the variable : "IsTableData". If it is "true" Then the Field "VALUE" should display the table inside the cell. But it is not displaying the Table. Instead it is just printing the value.
i have tried to represent my problem in the attached project. Please help me to display the table inside the Field. If the value of the IstableData = True
Thank you for the code you have sent.
I will suggest taking a look at this topic:
https://ko.infragistics.com/community/blogs/andrew_smith/archive/2009/12/09/common-style-issues-when-using-the-theme-property.aspx
There is an explanation of Common Style Issues when using the Theme property. There are several examples, also how to use the BasedOn property.