Hi,
Using Q2 2010 SP1 on XP Pro with C# .NET 3.5
I'm noticing that when I copy values from a comboBox where the comboBox is setup like
GridViewComboBoxColumn combo= ((GridViewComboBoxColumn)gridView.Columns[
"myColumn"
]);
combo.ItemsSource = GetGrouping();
//returns List<Group> which just contains GroupName, and GroupId referenced below
combo.DataMemberBinding =
new
Binding(
"GroupId"
);
combo.DisplayMemberPath =
"GroupName"
;
combo.SelectedValueMemberPath =
"GroupId"
;
if I copy that onto the clipboard I get the display value.. but whenever I paste.. the value doesn't paste properly onto the GridViewComboBox because it's expecting the Id value from the paste. I verified this by changing the paste value inside the
PastingCellClipboardContent event. When I changed the "Name" value to a corresponding "Id" value the paste was "visually succesful" meaning the display value on the datagrid changed to match the value I copied from the originiating ComboBox cell.
There doesn't seem to be any other option when copying (and I don't really think there should be.. because that would break pasting to external applications)... but I'm wondering if I've just setup the column improperly or is this just the way this control works?
Thanks for any assistance.