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
Hi spicish2222,
you could check this forum thread out.There you can find a sample solution demostrating how to use a XamComboEditor in a TemplateColumn.
HTH,
i did see that thread before posting. so just for giggles i re wrote it as my proj is in VB. i created all my own objects and it works fine. i tried to create similar test in my main project and it does not work. i am using EF and RIA. in that proj i am using the classes that are generated in the metadata file. i even went as far as overiding the 'equals' in a partial to ensure it was comapring, still no luck.
this issues seem to be related to when you access the XamComboEditor in say and editing template col. if you change the option in the editor it will update the value, it just doesnt bind automatically when you access it
again this seems to work with no isses with a standard combobox. i ran a test with one DDS and two IG grids, one with combobox in templated col and one with XamComboEdititor in templaed col adn they clearly behave different
code:
SelectedItem="{Binding myObj, Mode=TwoWay}"
???
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.
Hi,
without looking at a sample code I could think of two thinks that might have gone wrong:
Hope this helps,
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>
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.
no we have not resolved the issue. i have not had time to write a sample project. due to the time lines of the current project we had to abondon that control for the time being which is quite disappointing.
Hello spicish2222,
I am just checking if you got this worked out, or you still require any assistance, or clarification on the matter.
Would you please explain in more details your issue so we can try and find a solution for you.
apparently binding does not work correctly in the XamMultiColumnComboEditor either.
very disapointing
I am sorry to hear that, if you get back to researching this issue please open a new thread referencing this one’s link.
Thank you for using Infragistics components.