Hi,
I am blocked at xamdatagrid validation for 2 days now. I have exercised your forum's answers but none of them helped me.
I am using a xamcomboeditor on a field, and setting itemsprovider via style using:
<igEditors:ComboBoxItemsProvider x:Key="ComboItemsProvider" ItemsSource="{Binding Path=ListOfModels, Source={StaticResource viewModel}}" DisplayMemberPath="Name" ValuePath="Id"/>
Problem is that, now if I want to use Clipboard operations, ("ALL"), this cell is accepting anything. Not checking if the item being pasted is available in the list of items.
FYI: I have tried using this:
<Setter Property="ValueConstraint"> <Setter.Value> <igEditors:ValueConstraint Enumeration="{Binding Source={StaticResource ComboItemsProvider}}"/> </Setter.Value> </Setter>
seems like enumeration not binding properly.
PS: I have also tried binding this enumeration with another class that has the same list (which is redundant and not right), but it doesnt work even then.
Please help me out.
I tried your sample and I compared it with my project and there's just the itemsource binding difference, as I am using MVVM approach, which (I guess) is causing the validation issue.
Sorry, I couldn't modify your uploaded sample. There seems to be some binding issue.
Can you modify the sample with a dictionary (present in ViewModel) binded with the itemsource instead of "ObjectDataProvider" from "Sector" class?
That would clear all differences, I guess.
Thanks.
Hello,
Were you able to check the sample I uploaded. I believe there everything works as you want. If it doesn't;'t satisfies all your needs could you please modify the data there and use the settings you shared and send the sample back , so I would be able to investigate it further for you.
Looking forward for your reply.
I have used:
ItemsSource="{Binding Path=dictionaryOfSectors, Source={StaticResource viewModel}}"
instead of:
<ObjectDataProvider x:Key="odp" MethodName="CreateSectors" ObjectType="{x:Type local:Sectors}"/>
and ItemsSource="{Binding Source={StaticResource odp}}"
Can this cause any difference? Cause I am still getting invalid value message on selecting other item from the combobox.
I have been looking into the sample and I modified it, so now it works as you want. Basically I used Converter to set the Enumeration, because when you use Dictionary its items are KeyValuePair and they should be only the values of the Dictionary. Please let me know if this helps you or you need further assistance on this matter.
PFA.
I have a dictionary binded with the UnboundField.
Thanks