c#中使用devexpress gridcontrol 获取排序后的gridview数据

//获取排序后的DataTable

DataTable _dt = lvwItems.GridControl.DataSource as DataTable;

DataTable table = _dt.Clone();

for (int i = 0; i < lvwItems.RowCount; i++)

{

if (lvwItems.IsGroupRow(i))

continue;

var dr = lvwItems.GetDataRow(i);

if (dr == null)

continue;

table.Rows.Add(dr.ItemArray);

}

相关推荐
寻寻觅觅☆23 分钟前
东华OJ-基础题-104-A == B ?(C++)
开发语言·c++
刘欣的博客24 分钟前
C# CS架构程序发版升级的走数据库方案
c#·单文件升级自己的方式
lightqjx33 分钟前
【C++】unordered系列的封装
开发语言·c++·stl·unordered系列
zh_xuan1 小时前
kotlin lazy委托异常时执行流程
开发语言·kotlin
阿猿收手吧!1 小时前
【C++】string_view:高效字符串处理指南
开发语言·c++
玄同7652 小时前
我的 Trae Skill 实践|使用 UV 工具一键搭建 Python 项目开发环境
开发语言·人工智能·python·langchain·uv·trae·vibe coding
Yorlen_Zhang2 小时前
Python Tkinter Text 控件完全指南:从基础编辑器到富文本应用
开发语言·python·c#
lxl13072 小时前
C++算法(1)双指针
开发语言·c++
不绝1912 小时前
C#进阶:预处理指令/反射,Gettype,Typeof/关键类
开发语言·c#
无小道2 小时前
Qt-qrc机制简单介绍
开发语言·qt