Hi,
I want to copy the selected cells of my ultrawingrid to excel (using the ctrl+c / ctrl+v classic way).
Basically here are my grid's properties:
ultragrid.DisplayLayout.Override.RowSizing = RowSizing.AutoFixed currentBand.Layout.Override.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.CellSelect currentBand.Layout.Override.AllowMultiCellOperations = AllowMultiCellOperation.CopyWithHeaders currentBand.Layout.Override.HeaderClickAction = HeaderClickAction.Select ultragrid.DisplayLayout.Override.RowSelectors = Infragistics.Win.DefaultableBoolean.True ultragrid.DisplayLayout.Override.RowSelectorHeaderStyle = Infragistics.Win.UltraWinGrid.RowSelectorHeaderStyle.SeparateElement
ultragrid.DisplayLayout.Override.RowSizing = RowSizing.AutoFixed
currentBand.Layout.Override.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.CellSelect
currentBand.Layout.Override.AllowMultiCellOperations = AllowMultiCellOperation.CopyWithHeaders
currentBand.Layout.Override.HeaderClickAction = HeaderClickAction.Select
ultragrid.DisplayLayout.Override.RowSelectors = Infragistics.Win.DefaultableBoolean.True
ultragrid.DisplayLayout.Override.RowSelectorHeaderStyle = Infragistics.Win.UltraWinGrid.RowSelectorHeaderStyle.SeparateElement
All works fine so far when I select a range of cells, or when I select some rows with the row selectors.
I mean, the whole selected data can be copied/paste to excel, with ctrl+c/ ctrl+v.
Now, when I select a set of columns, clicking on the headers, then all the cells of these columns are selected (which is OK) BUT when I ctrl+c/ctrl+v to excel, only the single active cell is copied in the workbook.
I believe it's bug (known ? corrected ? I'm working with v9.1.20091.2094) but may be I have to set a mysterious property somewhere.
A similar question is answered here:
How To Copy Grid Column Data - Infragistics Community
Thanks for link.
So, the point is that the Selected.Columns property does not contain any cells, while Selected.Cells and Selected.Rows properties reference the cells.