Hi,
selecting one or more Headers in the UlttraGrid and pressing Strg-C, copies the first Header and left upper cell. The cell selection below the selected Headers is correct.
The grid should work similar as Excel. The User shoulod be able to select several culumns, by clicking on the header and copy the values incl. the header text into a excel sheet.
I use the following settings:
grid.DisplayLayout.CaptionVisible = Infragistics.Win.DefaultableBoolean.False;grid.DisplayLayout.ColScrollRegions.Add(colScrollRegion1);grid.DisplayLayout.ColScrollRegions.Add(colScrollRegion2);grid.DisplayLayout.Override.AllowAddNew = Infragistics.Win.UltraWinGrid.AllowAddNew.No;grid.DisplayLayout.Override.AllowDelete = Infragistics.Win.DefaultableBoolean.False;grid.DisplayLayout.Override.AllowMultiCellOperations = ((Infragistics.Win.UltraWinGrid.AllowMultiCellOperation)((Infragistics.Win.UltraWinGrid.AllowMultiCellOperation.CopyWithHeaders | Infragistics.Win.UltraWinGrid.AllowMultiCellOperation.Paste)));grid.DisplayLayout.Override.RowSizingArea = Infragistics.Win.UltraWinGrid.RowSizingArea.RowBordersOnly;grid.DisplayLayout.Override.SelectTypeCell = Infragistics.Win.UltraWinGrid.SelectType.Extended;grid.DisplayLayout.Override.SelectTypeCol = Infragistics.Win.UltraWinGrid.SelectType.Extended;grid.DisplayLayout.Override.SelectTypeRow = Infragistics.Win.UltraWinGrid.SelectType.Extended;grid.DisplayLayout.Override.SummaryDisplayArea = Infragistics.Win.UltraWinGrid.SummaryDisplayAreas.None;grid.DisplayLayout.Scrollbars = Infragistics.Win.UltraWinGrid.Scrollbars.Both;grid.DisplayLayout.UseFixedHeaders = true;grid.DisplayLayout.ViewStyle = Infragistics.Win.UltraWinGrid.ViewStyle.SingleBand;grid.Dock = System.Windows.Forms.DockStyle.Fill;grid.Location = new System.Drawing.Point(0, 0);grid.Name = "grid";grid.Size = new System.Drawing.Size(723, 584);grid.TabIndex = 5;grid.Text = "ultraGrid1";grid.UseOsThemes = Infragistics.Win.DefaultableBoolean.True;grid.Error += new Infragistics.Win.UltraWinGrid.ErrorEventHandler(grid_Error);grid.KeyDown += new System.Windows.Forms.KeyEventHandler(grid_KeyDown);grid.InitializeRow += new Infragistics.Win.UltraWinGrid.InitializeRowEventHandler(grid_InitializeRow);grid.Validated += new System.EventHandler(grid_Validated);grid.KeyPress += new System.Windows.Forms.KeyPressEventHandler(grid_KeyPress);grid.InitializeLayout += new Infragistics.Win.UltraWinGrid.InitializeLayoutEventHandler(grid_InitializeLayout);grid.AfterRowRegionScroll += new Infragistics.Win.UltraWinGrid.RowScrollRegionEventHandler(grid_AfterRowRegionScroll);grid.AfterSelectChange += new Infragistics.Win.UltraWinGrid.AfterSelectChangeEventHandler(grid_AfterSelectChange);
Any Ideas how to solve this?
You might want to look at the options on the AllowMultiCellOperations property. There is an option for Copy and a separate option of CopyWithHeaders. So be sure to choose the right one.
Hi Mike,
I was wondering under which property contains that "AllowMultiCellOperations" and "CopyWithHeaders"
Thanks for the quick reply. Unfortunaly this is not the issue. I will make an sample:
The Grid looks like:
H1 H2 H3D1 D2 D3D4 D5 D6
H* are the headers; D* are the data cells
If I click on Header H2, which selects the column, press <Strg><C> and past into Excel. The pasted values are these:
H1 H2 H3D1 D2 D3
This is not what I expected.
The selection (blue highlighted, except the header of course) in the grid looks OK. Like the expected result:
H2D2D5
Any other ideas?
I try to create a striped code sample.