Hi,
I have a table with some foreign keys, i am trying build a XamDataGrid, where the foreign keys are translated display the code as well as the user can edit them.
So i have come with the following code in my XAML.
My grid is auto generated and i control the display of fields from code behind.
case "ExpenseLedgerPlanKey": field.Label = "Expense Ledger Plan #"; field.Width = Infragistics.Windows.DataPresenter.FieldLength.Auto;
//unable to create a binding path. field.Settings.EditorStyle = (Style)Resources["YearsFieldStyle"]; break;
I tried creating a unbound field, it throws "Collection was modified; enumeration operation may not execute." exception, as i am controlling all the fields on the FieldLayout_Initialized event of the XamDataGrid.
Hello Venkata,
Thank you for your post. I have been looking into it, but it seems like that I am missing something in your scenario, so if this is still an issue for you, could you please send an isolated sample project, where the issue is reproduced, so I can investigate it further for you.
Looking forward for your reply.
Hi Stefan,
Please find the sample attached, I have a screenshot in the attached solution in the folder named screenshots, which describes the problem i am having.
Thanking you in advance,
Regards,
Sagar
Hello Sagar,
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.
I can suggest you see this blog:
http://blog.magnusmontin.net/2013/06/30/handling-events-in-an-mvvm-wpf-application/
where three approaches, for handling events in viewmodel, are explained in details. Please let me know if you need further clarifications on this matter.
I have a XamComboEditor:
<igEditors:XamComboEditor Foreground="Black" Background="#CDDCAF" Grid.Column="1" Grid.ColumnSpan="4" Grid.Row="2" Name="SchedLowComboEditor" ItemsSource="{Binding SchedTitles}" DisplayMemberPath="Value" ValuePath="Key" Value="{Binding SelectedSchedLow.ScheduleTitleKey}" SelectedItemChanged="{Binding ?? }"
I want to bind the SelectionChanged event to method in ViewModel, so that i can refresh the data of my form.
Any suggestions or help?
With Regards,
I can suggest you see these links:
http://help.infragistics.com/Help/Doc/WPF/2011.2/CLR4.0/html/xamComboEditor_Using_xamComboEditor_to_Edit_a_Field_in_xamDataGrid.html
and
http://ko.infragistics.com/community/forums/t/63525.aspx
where it is explained how to use a XamComboEditor to edit a Field. Please let me know if you need further clarifications on this matter.