Is there any easy way to perform cut/copy/paste operations of UltraGridRows in Grids? I know it has built-in functions for Cells but how about rows.
Let me know.
Yes, check out the AllowMultiCellOperation property on the Override.
AllowMultiCellProperty has everything relating to cells but not withrespect to rows.
This is the error I am getting when I am trying to cut 3 rows and paste them back in another group.
I'm not sure what you are asking. This error message is pretty clear to me and explains in detail why it's not working. You cannot paste to add new rows to a collection, pasting will only paste over existing cells.
If you want to add the ability to paste new rows into a collection, then you would have to implement that yourself.
Regarding the context menu, there is no built-in context menu, but you could easily add one to the grid and call the PerformMultiCellOperation method when the user clicks on one of your context menu items.
Thanks. I want to copy rows from one group to another group not replacing any rows from the second group.
I have seen a event called BeforeMultiCellOperation.Over here when
e.operation = paste, I am trying to add empty rows first in the destination group and then continue pasting. But this event is not at all hitting and always I am getting the above error msg. But if I work with one row then it works fine, it is creating an empty row and then pasting the row in the newly created row.
Is there any event that occur before actually trying to perform the paste operation so that I can avoid the above error? I mean any event of the grid which hits before showing the above error msg??
I need some event which needs to hit before performing the actual cut and paste operation.
If any cell within the active row is disabled, it throws an error while copying. So how to get the selected row in edit mode before actually doing the cut operation.
I tried even BeforePerformAction event
If e.UltraGridAction = Cut then
e......
no property is there for setting the selected rows to be in edit mode.
Once again, I am not sure what you are asking.What does edit mode have to do with it?
If you want to add rows to the grid in code, then you can simply add them using the Add method on the Band, or else add the data directly to the data source. The grid does not have to be in edit mode for you to programmatically add rows to it.
You could cancel the display of this error by handling the Error event of the grid.
When I am performing paste, as one of my cell is disabled, it is throwing this
error.I am still using the builtin cut,copy paste features of the grid,except that I am trying to create empty rows before performing the paste.
But I follow your suggestion of doing the operation on the dataset side and try to update it.
Hope it works.