For example, I have two rows in the datagrid and one rows has a comboEditor with fhree items "1,2,3" and another row has a comboEditor with three items "4,5,6"
when I copy the selected first row and paste it into the second row, the items source of the combo box couldn't be replaced to "1,2,3".
Do you know if this is possible? and how archive it?
Thank you very much.
HI,
The copy and paste will not change the Itemsource of the ComboEditor.
It seems that you have two different Itemsources for the ComboEdtior.
What determines the values in the ItemSource of the ComboEditor? .
Sincerely, Matt Developer Support Engineer
Hi Matt,
Yes I have different items source for the comboEditor.
But the items source are both type of ObservableCollection<MyType>, I just hope the collection could be also pasted not only the selected value.
HI lma,
Can you provide a small sample or attach the xaml used to determine which itemsource is used by a the ComboEditor? A small sample would be best.
A possible solution:
You could wire up the XamDataGrid's ClipBoardPasting Event and make the appropriate changes in that event to change the itemsource.
I wired up the ClipBoardCopying and Pasting Events.
Here is the new sample.
Sincerely,
Matt Developer Support Engineer
I have provide two rows in the datagrid and the items source of the two comboEditor are different.
When I copy the first row and paste it to the second row, the items source of the second row is not replaced with the first row's. Is there any way which can archive this? If there is, could you please change the sample application and send it back to me?
Thank you very much!