Hi!
I use wingrid 10.3 with latest service release (mai 2011) and I would like to know if it is possible to copy paste multiple rows in the add new row line ?
Currently, I have a grid with a add new row line placed at the fixed bottom of the grid. I want to allow users to copy existing rows in the grid and create new rows by pasting them in the add new row line. My grid id databind to a sql table via .net DataTable. But it gives me an error for the moment. Is there a way to do this ?
Best regards,
Benoit
Hi Benoit,
There's no built-in functionality to allow you to add multiple rows to the grid at once via a paste operation. It would be very difficult for the grid to handle this, since the BindingManager in DotNet is not set up to allow you to have multiple new rows in edit mode at the same time.
If you know for certain that the data in the clipboard is valid so that each row can be committed without any errors, then you could try handling the BeforeMultiCellOperation and trapping for when the AddNew (or TemplateAddRow) is selected and then handle the paste yourself in code.
Or, if your data source supports add empty rows, you might be able to add the appropriate number of empty rows to the grid and selected them before the paste operation occurs.
But I have not tried this approach, so I am not sure if it is feasible.