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..??
Hello Dann,
I am just checking if you require any further assistance on the matter.
Thank you for your feedback. Feel free to tell me if you have any questions on this matter after looking through the link with which I have provided you.
Hi yanko,
I have tested the above but without any further luck :-(
I have in the meantime been facing a non-infragistics related issue that I need to sort out before proceeding with this issue.
Once this is sorted I will come back to this problem and keep you updated.
BR
Dann
Hello,
I have been looking into your issue and I can suggest you look into the following link from our online documentation about using XamComboEditor to edit a Fireld in XamDataGrid :
http://help.infragistics.com/Help/NetAdvantage/WPF/2011.2/CLR4.0/html/xamComboEditor_Using_xamComboEditor_to_Edit_a_Field_in_xamDataGrid.html
You can also look into the following forum thread where Krasimir has provided a sample application :
http://ko.infragistics.com/community/forums/p/60491/306995.aspx
If you need any further assistance on this matter, feel free to ask.