I was writing some sample to use a XamComboEditor inside a grid in a template column as well as a Temple Column Layout. Is it assumed that Binding the selected item does not work the same way a standard combo works?? when i replace the XamComboEditor with a standard ComboBox the samples work as expected. I have seen on the samples site that a value converter is used to wire up the binding. Is this required. I am using ria services with EF.
Thanks
Hello,
I am just checking if you got this worked out or you still require any assistance or clarification on the matter.
If this is what you were looking for please verify the answer so it helps other users as well.
I have also been following your discussion with Konstantin and was wondering if you could provide us with a working test sample we can use for further investigating your particular issue.
Thanks in advance. Looking forward to hearing from you.
the list is not a simple object. it is based on one of the type from a table which ends up being a class with properties (ID, Desc)
i had the cell key tied the child object. i tested out changing it to the ID which did not work either. being that it is a templated colum i would have assume the key should be tied to the whole object. here is a cleaned up sample. agian when i swtich to the combobox no issues
<ig:TemplateColumn Key="myChild"> <ig:TemplateColumn.ItemTemplate> <DataTemplate> <TextBlock Text="{Binding myChild.Desc}" /> </DataTemplate> </ig:TemplateColumn.ItemTemplate> <ig:TemplateColumn.EditorTemplate> <DataTemplate> <ig:XamComboEditor ItemsSource="{Binding Source={StaticResource mySource}, Path=Data}" DisplayMemberPath="Desc" SelectedItem="{Binding myChild, Mode=TwoWay}"/>
<!--<ComboBox ItemsSource="{Binding Source={StaticResource mySource}, Path=Data}" DisplayMemberPath="Desc" SelectedItem="{Binding myChild, Mode=TwoWay}" />-->
</DataTemplate> </ig:TemplateColumn.EditorTemplate> </ig:TemplateColumn>
Hi,
without looking at a sample code I could think of two thinks that might have gone wrong:
Hope this helps,
sorry i will try to clarify this " if you change the option in the editor it will update the value, it just doesnt bind automatically when you access it".
what i was trying to say...
if i have a row in a grid and i go to edit the field with a xamcombo in it. this row will typically have a value say option 1 (with ID=1). when i initial the editing mode the xamlcombo will not have a value selected (which is the issue). while in editing mode and when i open the xamcombo and select a new option, say option 2, and then leave the editing state i can see that the xamcombo updates the object. the rows item template will show the newly selected option 2. i i go back to edit it again the xamcombo will not have a value selected. at this point option 2 should be selected and it not. if i pick new option say 3 it will update the object but will not show up if i go to edit agin.
i do not have enough time to spin up a genenric sample and am not permitted to send the project i am working on due to company policy. the scenairo we are writing is pretty straight forward. a request table and say a status table. we are pulling the data with a domaindatasource in the sl page resources area.