I am new to C# and the UltraGrid.
I want to add a WinForm Copy button that will paste all highlighted grid rows into the current Ultragrid as new rows (I have an identity field column, so, dupes will not be an issue.)
I guess I am just not 'getting' it yet as googling and help searching has not helped. I would have thought this would be such a simple, built in feature that would be easy to find and implement???
2 QUESTIONS:
1) Does anyone have the C# button code that will copy the highlighted grid row(s) and paste into the same grid?
2) Does anyone have the code (or settings) to do the same copy in a Ctlr/C Ctrl/V copy ppaste in the grid?
Watson,You can refer the following help article from Infragistics:http://help.infragistics.com/Help/NetAdvantage/WinForms/2009.1/CLR2.0/html%5CWinGrid_Creating_an_Edit_Menu_with_Clipboard_Operations_for_WinGrid.htmland following code will help you to copy and paste the grid data: private void btnCopy_Click(object sender, System.EventArgs e) { this.UltraGrid1.PerformAction(UltraGridAction.Copy); } private void btnPaste_Click(object sender, System.EventArgs e) { this.UltraGrid1.PerformAction(UltraGridAction.Paste); }Thank you.Bunty :)
I am having the same problem. I am already using "ultraGridAnalyzer.PerformAction(UltraGridAction.Copy);" which he probably was too, but it just does not work. It does not add anything to my clipboard. I can step though the code and it is being executed.
Can anyone help?
I got it working. I added the line "ultraGridAnalyzer.DisplayLayout.Override.AllowMultiCellOperations = AllowMultiCellOperation.Copy;" that I happen to find looking through the object browser. I suppose this was left out of the documentation. So frusterating using these controls.