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
1230
Paste Feature worked in 2010 Vol 1, Not anymore in 2010 Vol 2
posted

Hi,

Our users use the "Paste into XamDataGrid" feature rather extensively.  A specific portion of the Paste functionality stopped working when we recently upgraded to NetAdvantage for Win Client 2010 Vol. 2. We have also installed the latest service release (NetAdvantage_WPFAndDV_20102.2001_SR) and still no success.

Please see the explanation below of exactly what Paste feature I am referring to:

We use the XamComboEditor control extensively in our XamdataGrids. It would seem, that since recently, when a XamComboEditor is bound to a complex type, that the XamComboEditor is unable to resolve a matching item when pasting a text value that should match the displaymember text of one of its items.

If you copy a cell's value in the grid, and then paste into the same cell in another row, IT WORKS FINE,

BUT when you paste a TEXT value (that should match the displaymember text of 1 of its items) the grid raise the following error:

---------------------------Paste Error---------------------------
An error occurred while validating the value for the cell. Additional information:
Continue with the remaining cells?
---------------------------
OK Cancel
---------------------------

If I however Paste a TEXT value that matches one of the items' ValueMembers (ID value...), it does resolve the correct item.

Please use the attached sample application provided and follow the steps below.

PS I created the sample app using some of the sample code from the latest feature browser incorporating 2 separate implementations of the XamComboEditor.

.

  1. Run the sample
  2. Note that Column "Status" is bound to an Enum
  3. Note that Column "Priority" is bound to a more complex type with the Display member path and Value member path properties set accordingly.
  4. If you paste a TEXT value of "Ready" into any cell of column Status, it resolves the combo item correctly (so Enums work perfectly)
  5. If you paste a TEXT value of "Low" into any cell of column Priority, the Paste error as explained above is raised. ** This used to work; resolve the correct corresponding item **
  6. If you paste a TEXT value of "2" (this is the value of priority "Normal"), the combobox resolves the correct item. (users don't / shouldn't know the ID values of the dropdown items, so this makes no sense)
  7. If you copy any cell of column Priority (in the grid) and paste it into another row on a cell of column Priority, it also resolves the dropdown value correctly. (how is this any different, but work correctly?)

I don't know if this is an issue with the XamComboEditor or the ClipboardPasting code-behind of the XamDataGrid, but my primary concern is that this used to work, but since upgrading it does not work anymore.

I would really appreciate a response as this has raised some eyebrows from our users.

Regards,

Martin

WpfApplication1.zip
Parents Reply Children
No Data