<igDP:Field Name="two"> <igDP:Field.Settings> <igDP:FieldSettings CellValuePresenterStyle="{StaticResource MaintenanceIndicatorStyle}"/> </igDP:Field.Settings> </igDP:Field>
<igDP:Field Name="three"> <igDP:Field.Settings> <igDP:FieldSettings CellValuePresenterStyle="{StaticResource MaintenanceIndicatorStyle}"/> </igDP:Field.Settings> </igDP:Field>
<igDP:Field Name="four"> <igDP:Field.Settings> <igDP:FieldSettings CellValuePresenterStyle="{StaticResource MaintenanceIndicatorStyle}"/> </igDP:Field.Settings> </igDP:Field>
above, field was set respectively. How to make xamdatagrid`s all cell equally by one settings? and in code behind can be setting?
Hi,
I suggest you the following (as prerequisites):
1. Go to http://es.infragistics.com/dotnet/netadvantage/wpfdownloads.aspx page ;
2. Download and install the NetAdvantage for WPF 2008 Vol. 1 product ;
There are so many properties on the FieldSettings class that it would be very inconvenient for you to have to set them all on every Field object. Let me offer you two possible solutions.
Solution 1 – If an individual Field object has no explicit value for a property on its Field settings, the value for that property resolves to the FieldSettings on the Field Layout.
All Fields related to a particular type of data record can therefore share the same Fields settings at the level of their Field Layout.
Look in NetAdvantage for WPF xamFeatureBrowser ->xamDataGrid->Layout and Behavior-> FieldSettings Overrides sample
In the FieldSettings Overrides sample focus on the part below . I have made some changes to correspond to your XAML snippet:
<igDP:FieldLayout.FieldSettings>
<igDP:FieldSettings CellValuePresenterStyle=
"{StaticResource MaintenanceIndicatorStyle}"/>
<igDP:FieldLayout.Fields>
<igDP:Field Name="two"/>
<igDP:Field Name="three"/>
<igDP:Field Name="four"/>
</igDP:FieldLayout.Fields>
Solution 2 - Simply create a new Style which targets the CellValuePresenter control and use the ControlTemplate to gain
xamDataGrid->Themes and Custom Styles-> Custom CellValuePresenter Style – Advanced sample
to see the implementation of the solution .