using DevExpress.Utils;
using DevExpress.XtraEditors;
using DevExpress.XtraGrid;
using DevExpress.XtraGrid.Columns;
using DevExpress.XtraGrid.Views.Base;
using DevExpress.XtraGrid.Views.Grid;
using DevExpress.XtraGrid.Views.Grid.ViewInfo;
private void CopyTitle()
{
StringBuilder stringBuilder = new StringBuilder();
StringBuilder stringBuilder2 = new StringBuilder();
foreach (GridColumn gridColumn in this.gridView1.Columns)
{
if (gridColumn.Visible)
{
stringBuilder.AppendFormat("{0} ", gridColumn.Caption);
}
}
int[] selectedRows = this.gridView1.GetSelectedRows();
int[] array = selectedRows;
for (int i = 0; i < array.Length; i++)
GridControl 粘贴板功能
最新推荐文章于 2020-11-28 01:26:40 发布
本文介绍如何在DevExpress的GridControl中实现复制标题和单元格数据到剪贴板的功能。通过遍历可见列获取标题,并为选定行获取显示文本,最后将内容设置到剪贴板。
摘要由CSDN通过智能技术生成