have a bit of a problem
I want to be able to copy and paste bindingsources (sort of)
If I am in a "product" view, a product can have many orders. I only want to be able to copy the current displaying product and order (done).
I then want to be able to add a new Product for a customer and be able to paste in the copied item - this kind of works except that it seems to paste the exact record as was copied - ok that doesnt make much sense...
basically it overwrites the existing one and not adding it to this new customer - it brings back up the old customer record.
I want to be able to add a new record for the selected customer in the productBindingSource (.AddNew()) and paste the details in. what is the best way of doing this?
Code:this.productBindingSource.AddNew(); TList<Product> toPasteProduct = new TList<Product>(); toPasteProduct.Add(ClipboardObjects.CurrentCustomerProduct); toPasteProduct[0].CustomerID = (int)this.cmbCustomerIDFilter.SelectedValue; Customer cust = this.cs.GetByID((int)this.cmbCustomerIDFilter.SelectedIndex); toPasteProduct[0].CustomerIDSource = cust; this.productBindingSource.DataSource = toPasteProduct; //here is the problem I believe
how should I copy and paste the selected product into a new record for the customer without it overwriting or bringing back up the original customer?





any chance of a regain? 
Reply With Quote