Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
7228 | Sep 16,2003 07:00 PM UTC | Sep 18,2003 07:22 AM UTC | WinForms | 6 |
![]() |
Tags: GridControl |
private void gridControl1_ClipboardCopy(object sender, GridCutPasteEventArgs e) { if(e.RangeList.Count == 0) { GridRangeInfoList list = new GridRangeInfoList(); list.Add(this.gridControl1.CurrentCell.RangeInfo); this.gridControl1.CutPaste.CopyCellsToClipboard(list, true); e.Handled = true; e.Result = true; } }
private void gridControl1_ClipboardCopy(object sender, GridCutPasteEventArgs e) { if(e.RangeList.Count == 0) { //get a copy of existing cell style GridCurrentCell cc = this.gridControl1.CurrentCell; GridStyleInfo style = new GridStyleInfo(this.gridControl1[cc.RowIndex, cc.ColIndex]); //apply QueryCellInfo row/col attributes GridStyleInfo style1 = new GridStyleInfo(); //row changes this.gridControl1.Model.GetCellInfo(cc.RowIndex, -1, style1); style.ModifyStyle(style1, Syncfusion.Styles.StyleModifyType.ApplyNew); //col changes this.gridControl1.Model.GetCellInfo(-1, cc.ColIndex, style1); style.ModifyStyle(style1, Syncfusion.Styles.StyleModifyType.ApplyNew); //save the data to the clipboard GridData data = new GridData(); data.RowCount = 1; data.ColCount = 1; data[0,0] = style.Store; Clipboard.SetDataObject(data); } }
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.