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 ...
随机推荐
- c——闰年
PTA #include<stdio.h> int main() { int year,month,day,cnt,flag; flag = ; scanf("%4d/%2d/% ...
- 多线程与CPU和多线程与GIL
多线程与CPU:1.单核CPU CPU密集型的程序(做计算操作的程序) 单线程即可( 此时的任务已经把CPU资源100%消耗了,就没必要也不可能使用多线程来提高计算效率)2.单核CPU IO密集 ...
- C++实现简单学生管理系统
在网上看到的一个C++的小项目,我自己码了一遍,然后记录下我的理解以及像我这种菜鸟在整个过程中产生的问题. 我将我知道的尽可能详细的写下来,如有错误请联系我哈,QQ:920209178. 原文地址:h ...
- 在ubuntu服务器上安装tomcat 9
前提条件: 确保ubuntu服务器上 已经安装 java 8 或更高版本,安装java8可以参考我的另一篇博文 通过 ppa 在ubuntu server 上安装java 8 java -versio ...
- Jquery的动态切换图片
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- 游戏人工智能编程案例精粹(修订版) (Mat Buckland 著)
https://www.jblearning.com/catalog/productdetails/9781556220784 第1章 数学和物理学初探 (已看) 第2章 状态驱动智能体设计 (已看) ...
- imp 导入报错
imp user/passwd file=/data/oracle/oraclesetup/passwd.dmp 报错: Export file created by EXPORT:V11.02.00 ...
- 使用phpunit测试yaf项目操作步骤
yaf + phpunit 使用phpunit对yaf进行测试的核心在于bootstrip文件的配置. *1. 首先在项目目录下创建tests文件,并在tests中创建phpunit.xml < ...
- 友善RK3399/NanoPC-T4开发板wiringPi Python库访问GPIO外设实例讲解 -【申嵌视频】
1 wiringPi for Python简介 wiringPi for Python是wiringPi的Python语言扩展,用于在Python程序中操作GPIO/I2C/SPI库/UART/PWM ...
- php 学习资料
http://blog.csdn.net/woshihaiyong168/article/details/52846205 --队列基本原理的认识