supergridcontrol记录,分页
sqlserver分页记录
select top 50 DengJiBH,sSuoYouQuanShenQingRen,sZuoLuo,sQiuHao,sQuanHao,ChaXun_BianHao,rownumber,zZhuCeLXBH,sMianJi,gDengJiLXBH
from(
select row_number() over(order by isnull(Zi.DengJiBH,'00000000')) as rownumber,
dj_DengJi.DengJiBH,dj_DengJi.sSuoYouQuanShenQingRen,Zi.sZuoLuo,Zi.sQiuHao,
Zi.sQuanHao,isnull(Zi.DengJiBH,'00000000') as ChaXun_BianHao,Zi.zZhuCeLXBH,Zi.sSuoYouQuanZH,zi.sMianJi,zi.gDengJiLXBH
from dj_DengJi
left join dj_DengJi Zi on dj_DengJi.DengJiBH=Zi.zPiDengJiBH
where dj_DengJi.gQuanLi=4 and dj_DengJi.gWanCheng<>1
and dj_DengJi.sSuoYouQuanShenQingRen like '%鑫苑万卓%'
and Zi.sZuoLuo like '%高铁新城%'
--and dj_DengJi.DengJiBH='151004824 '
) b
where rownumber>(50*(1-1)) order by rownumber
superGridControl 复制单元格文本:
private void superGridControl2_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.C && e.Modifiers == Keys.Control)
{
var pos = PointToClient(MousePosition);
pos.Y -= this.superGridControl2.Parent.Location.Y;
var cell = this.superGridControl2.PrimaryGrid.GetElementAt(pos.X, pos.Y);
var col = this.superGridControl2.PrimaryGrid.GetColumnAt(pos);
if (cell != null && col != null)
{
var txt = (cell as GridRow).Cells[col].Value.ToString();
Clipboard.SetDataObject(txt, true);
ToastNotification.Show(this.Parent, "已复制" + txt, Xiang.Business.Properties.Resources.close_16px,
2000, eToastGlowColor.Blue, eToastPosition.TopCenter);
}
}
}
显示行头序号,从1开始
this.superGridControl2.PrimaryGrid.ShowRowGridIndex = true;
this.superGridControl2.PrimaryGrid.RowHeaderIndexOffset = 1;
选中行对象:
GridRow row = this.superGridControl2.PrimaryGrid.GetSelectedRows().FirstOrDefault() as GridRow;
var arc = row.DataItem as ArchivementDto;
选中行按回车:
private void superGridControl2_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
SelectedElementCollection col = this.superGridControl2.PrimaryGrid.GetSelectedRows();
if (col.Count > 0)
{
e.Handled = true;
GridRow row = col[0] as GridRow;
var item = row.DataItem as ApplySheetListDto; var dlg = new ApplyDetailDialog(item.applyId);
var pos = PointToScreen(this.gridColumn3.LocationRelative);
dlg.Location = pos;
dlg.ShowDialog();
}
}
else if (e.KeyCode == Keys.C && e.Modifiers == Keys.Control)
{
var pos = PointToClient(MousePosition);
pos.Y -= this.superGridControl2.Parent.Location.Y;
var cell = this.superGridControl2.PrimaryGrid.GetElementAt(pos.X, pos.Y);
var col = this.superGridControl2.PrimaryGrid.GetColumnAt(pos);
if (cell != null && col != null)
{
var txt = (cell as GridRow).Cells[col].Value.ToString();
Clipboard.SetDataObject(txt, true);
ToastNotification.Show(this.Parent, "已复制" + txt, Xiang.Business.Properties.Resources.close_16px,
2000, eToastGlowColor.Blue, eToastPosition.TopCenter);
}
}
}
单个文本设置颜色:
private void superGridControl1_GetCellStyle(object sender, GridGetCellStyleEventArgs e)
{
if (e.StyleType != StyleType.Default) { return; } var cell = e.GridCell as GridCell;
if (cell == null) { return; } if (cell.Value.ToString() == "历史")
{
e.Style.TextColor = Color.Red;
}
}
supergridcontrol记录,分页的更多相关文章
- MySQL单表百万数据记录分页性能优化
背景: 自己的一个网站,由于单表的数据记录高达了一百万条,造成数据访问很慢,Google分析的后台经常报告超时,尤其是页码大的页面更是慢的不行. 测试环境: 先让我们熟悉下基本的sql语句,来查看下我 ...
- [转]SqlSever2005 一千万条以上记录分页数据库优化经验总结【索引优化 + 代码优化】一周搞定
对普通开发人员来说经常能接触到上千万条数据优化的机会也不是很多,这里还是要感 谢公司提供了这样的一个环境,而且公司让我来做优化工作.当数据库中的记录不超过10万条时,很难分辨出开发人员的水平有多高,当 ...
- Jquery 表格操作,记录分页情况下,每一页中被用户勾选的信息
如下图,一个分页列表,用户可以随意勾选一条或多条信息,然后进行某种操作,如“提交”.但是有个问题:如果勾选了一条信息之后,点[下一页],那么上一页 勾选的条目被刷新掉了. 问题:如果用户需要在第1页, ...
- MS SqlSever一千万条以上记录分页数据库优化经验总结【索引优化 + 代码优化】[转]
对普通开发人员来说经常能接触到上千万条数据优化的机会也不是很多,这里还是要感谢公司提供了这样的一个环境,而且公司让我来做优化工作.当数据库中的记录不超过10万条时,很难分辨出开发人员的水平有多高,当数 ...
- MySQL 单表百万数据记录分页性能优化
文章转载自:http://www.cnblogs.com/lyroge/p/3837886.html 背景: 自己的一个网站,由于单表的数据记录高达了一百万条,造成数据访问很慢,Google分析的后台 ...
- MySQL单表百万数据记录分页性能优化,转载
背景: 自己的一个网站,由于单表的数据记录高达了一百万条,造成数据访问很慢,Google分析的后台经常报告超时,尤其是页码大的页面更是慢的不行. 测试环境: 先让我们熟悉下基本的sql语句,来查看下我 ...
- SqlSever2005 一千万条以上记录分页数据库优化经验总结【索引优化 + 代码优化】
对普通开发人员来说经常能接触到上千万条数据优化的机会也不是很多,这里还是要感谢公司提供了这样的一个环境,而且公司让我来做优化工作.当数据库中的记录不超过10万条时,很难分辨出开发人员的水平有多高,当数 ...
- SqlSever2005 一千万条以上记录分页数据库优化经验总结
http://www.cnblogs.com/jirigala/archive/2010/11/03/1868011.html 待测试???
- supergridcontrol记录
单元格换行: this.gridColumn2.CellStyles.Default.Alignment = DevComponents.DotNetBar.SuperGrid.Style.Align ...
随机推荐
- 让你真正了解Java(纯干货)
“你学习一门技术的最佳时机是三年前,其次是现在.”这句话对于哪一种行业都很适用,如果你已经学习过Java,那么恭喜你你很有先见之明,如果你并不了解Java,这篇文章带你快速掌握Java的几个核心知识点 ...
- 19. Rootkit detectors (隐形工具包检测器 5个)
Sysinternals提供了许多小型Windows实用程序,对于低级别的Windows黑客攻击来说非常有用. 一些是免费的和/或包括源代码,而其他是专有的. 调查受访者最喜欢:ProcessExpl ...
- android BluetoothAdapter蓝牙BLE扫描总结
1.android 4.3.1(Build.VERSION_CODES.JELLY_BEAN_MR2)增加的startLeScan(callback)方法,官方在5.0之后不建议使用,实测此方法,4. ...
- JavaScript自定义事件 - createEvent()、initEvent()和dispachEvent()
在学习目标事件的方法的时候,接触到了dispatchEvent()方法.度娘查一查,这是一个事件触发器,事件触发器其实就是触发事件的东西. 通常情况下,我们触发事件都是在交互中触发的事件,例如点击按钮 ...
- SQL语句整理
- nc--windows下工具分享
1.在windows下安装了9个memcached. 一些测试需要经常对这9个memcached的执行flush_all的操作 由于windows没有linux那样可以使用nc命令. 经过不懈搜索,找 ...
- 单机版Kubernetes集群(一)
环境:CentOS Linux release 7.4.1708 (Core) 单机版Kubernetes集群的效果,如图: 1)JSP页面通过JDBC直接访问Mysql数据库并展示:这里只是为了 ...
- aspnetcore 日志 serilog-aspnetcore
serilog-aspnetcore https://github.com/serilog/serilog-aspnetcore public static void Main(string[] ar ...
- 微软MSDN原版Windows Server 2008 R2 With SP1下载
Windows Server 2008 R2是windows 服务器版本Windows Server 2008 R2继续提升了虚拟化.系统管理弹性.网络存取方式,以及信息安全等领域的应用,其中有不少功 ...
- C# .net mvc web api 返回 json 内容,过滤值为null的属性
在WebApiConfig.Register 中增加一段 #region 过滤值为null的属性 //json 序列化设置 GlobalConfiguration.Configuration.Form ...