Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1360
Pasting data over combobox cells
posted

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

Parents
No Data
Reply
  • 30945
    Verified Answer
    Offline posted

    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

    XamDataGridInputValidation.zip
Children