When you paste data into cells that contain drop down lists, how do you stop them pasting data that isnt in the drop down lists? By default it seems to let you paste whatever you want into the cell and doesnt restrict them to pasting things that are in the dropdowns.
I tried using the ClipboardPasting event but couldnt find anything obvious to help me check the validity of the paste.
Thanks,Doug Rees
Polo Ralph Lauren
Hello Dong,
Sorry for the misunderstanding and thank you for re-explaining your issue. XamComboEditor’s property ValueConstraint is used to set the constraints of the input data for the editor. ValueConstraint has property called Enumeration that can be set to a collection that implements IEnumerable and represents the values that the editor can have. By setting this property you can restrict what value can be set to the editor even if you paste value from another cell.
I have created a sample application that binds the Enumeration to the same values as the ItemsSource of the XamComboEditor and does not allow pasting values that are not valid.
Please let me know if this is what you needed and if you require any further assistance on the matter.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics, Inc.
www.infragistics.com/support
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:ValueConstraintEnumeration="{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.