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
60
display XamComboEditor in XamDataGrid
posted

Hi

I am trying to have a coloumn display an XamComboEditor in my grid, but without any luck. I have tried a lot of different approaches but all with the same result. On runtime I get the errormessage saying:

'FieldSettings.EditorStyle's TargetType setting can only be null or a type that derives from ValueEditor or is a baseclass of ValueEditor, XamComboEditor is invalid. Parameter name: FieldSettings.EditorStyle'

Find below the code for my grid contained in a usercontrol:

<igDP:XamDataGrid x:Name="spDataGrid"
DataSource="{Binding CurrentSamplingPoints, UpdateSourceTrigger=PropertyChanged}"
ActiveDataItem="{Binding Path=ActiveSamplingPoint, Mode=TwoWay}">

<igDP:XamDataGrid.FieldLayoutSettings>
<igDP:FieldLayoutSettings AutoGenerateFields="False"
HighlightAlternateRecords="True"
AllowAddNew="True"
AddNewRecordLocation="OnBottomFixed"
DataRecordSizingMode="IndividuallySizable"
AllowClipboardOperations="All"
AllowDelete="False"
SupportDataErrorInfo="RecordsAndCells"
DataErrorDisplayMode="ErrorIconAndHighlight"/>
</igDP:XamDataGrid.FieldLayoutSettings>

<igDP:XamDataGrid.ViewSettings>
<igDP:GridViewSettings Orientation="Horizontal"></igDP:GridViewSettings>
</igDP:XamDataGrid.ViewSettings>

<igDP:XamDataGrid.FieldLayouts>
<igDP:FieldLayout Key="spLimitsLayout">
<igDP:FieldLayout.Fields>
<igDP:Field Name="SamplingPointCode" Label="Code" FixedLocation="FixedToNearEdge" />
<igDP:Field Name="SamplingPointName" Label="Name" FixedLocation="FixedToNearEdge" />
<igDP:Field Name="ClientDisplayName" Label="Client" />
<igDP:Field Name="SamplingPointDescription" Label="Description" />
<igDP:Field Name="Comment" Label="Comment" />
<igDP:Field Name="AddressLine1" Label="Address 1" />
<igDP:Field Name="AddressLine2" Label="Address 2" />
<igDP:Field Name="AddressLine3" Label="Address 3" />
<igDP:Field Name="AddressLine4" Label="Address 4" />
<igDP:Field Name="AddressLine5" Label="Address 5" />
<igDP:Field Name="AddressLine6" Label="Address 6" />
<igDP:Field Name="City" Label="City" />
<igDP:Field Name="ZipCode" Label="Zip" />
<igDP:Field Name="Phone" Label="Phone" />
<igDP:Field Name="Country" Label="Country" />
<igDP:Field Name="State" Label="State" />

<igDP:UnboundField BindingMode="TwoWay">
<igDP:UnboundField.Settings>
<igDP:FieldSettings EditorType="{x:Type igEditors:XamComboEditor}">
<igDP:FieldSettings.EditorStyle>
<Style TargetType="{x:Type igEditors:XamComboEditor}">
<Setter Property="ItemsSource" Value="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}, Path=DataContext.GetAvailableProducts}"/>
</Style>
</igDP:FieldSettings.EditorStyle>
</igDP:FieldSettings>
</igDP:UnboundField.Settings>
</igDP:UnboundField>

<igDP:Field Name="LatitudeDegrees" Label="GPS - Latitude degrees" />
<igDP:Field Name="LatitudeMinutes" Label="GPS - Latitude minutes" />
<igDP:Field Name="LatitudeSeconds" Label="GPS - Latitude seconds" />
<igDP:Field Name="LongitudeDegrees" Label="GPS - Longitude degrees" />
<igDP:Field Name="LongitudeMinutes" Label="GPS - Longitude minutes" />
<igDP:Field Name="LongitudeSeconds" Label="GPS - Longitude seconds" />
<igDP:Field Name="IsNotInUse" Label="Not in use" />
<igDP:Field Name="IsDeleted" Label="Deleted?" />
</igDP:FieldLayout.Fields>
</igDP:FieldLayout>
</igDP:XamDataGrid.FieldLayouts>
</igDP:XamDataGrid>

Any chance of help here..??