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记录,分页的更多相关文章

  1. MySQL单表百万数据记录分页性能优化

    背景: 自己的一个网站,由于单表的数据记录高达了一百万条,造成数据访问很慢,Google分析的后台经常报告超时,尤其是页码大的页面更是慢的不行. 测试环境: 先让我们熟悉下基本的sql语句,来查看下我 ...

  2. [转]SqlSever2005 一千万条以上记录分页数据库优化经验总结【索引优化 + 代码优化】一周搞定

    对普通开发人员来说经常能接触到上千万条数据优化的机会也不是很多,这里还是要感 谢公司提供了这样的一个环境,而且公司让我来做优化工作.当数据库中的记录不超过10万条时,很难分辨出开发人员的水平有多高,当 ...

  3. Jquery 表格操作,记录分页情况下,每一页中被用户勾选的信息

    如下图,一个分页列表,用户可以随意勾选一条或多条信息,然后进行某种操作,如“提交”.但是有个问题:如果勾选了一条信息之后,点[下一页],那么上一页 勾选的条目被刷新掉了. 问题:如果用户需要在第1页, ...

  4. MS SqlSever一千万条以上记录分页数据库优化经验总结【索引优化 + 代码优化】[转]

    对普通开发人员来说经常能接触到上千万条数据优化的机会也不是很多,这里还是要感谢公司提供了这样的一个环境,而且公司让我来做优化工作.当数据库中的记录不超过10万条时,很难分辨出开发人员的水平有多高,当数 ...

  5. MySQL 单表百万数据记录分页性能优化

    文章转载自:http://www.cnblogs.com/lyroge/p/3837886.html 背景: 自己的一个网站,由于单表的数据记录高达了一百万条,造成数据访问很慢,Google分析的后台 ...

  6. MySQL单表百万数据记录分页性能优化,转载

    背景: 自己的一个网站,由于单表的数据记录高达了一百万条,造成数据访问很慢,Google分析的后台经常报告超时,尤其是页码大的页面更是慢的不行. 测试环境: 先让我们熟悉下基本的sql语句,来查看下我 ...

  7. SqlSever2005 一千万条以上记录分页数据库优化经验总结【索引优化 + 代码优化】

    对普通开发人员来说经常能接触到上千万条数据优化的机会也不是很多,这里还是要感谢公司提供了这样的一个环境,而且公司让我来做优化工作.当数据库中的记录不超过10万条时,很难分辨出开发人员的水平有多高,当数 ...

  8. SqlSever2005 一千万条以上记录分页数据库优化经验总结

    http://www.cnblogs.com/jirigala/archive/2010/11/03/1868011.html 待测试???

  9. supergridcontrol记录

    单元格换行: this.gridColumn2.CellStyles.Default.Alignment = DevComponents.DotNetBar.SuperGrid.Style.Align ...

随机推荐

  1. The listener supports no services

    问题描述 sql> lsnrctl start 提示: The listener supports no services The command completed successfully ...

  2. SVN命令备忘录

    批量添加(先添加再上传) svn st | grep '^\?' | tr '^\?' ' ' | sed 's/[ ]*//' | sed 's/[ ]/\\ /g' | xargs svn add ...

  3. FlappyBird开发帮助文档

    FlappyBird开发帮助文档 项目需求 完成FlappyBird游戏. 功能说明: 游戏开始后,间歇性的点击鼠标,让小鸟向上飞,不会掉下来,并且要穿过柱子的空隙,不能碰到柱子,碰到就dead了,穿 ...

  4. ConcurrentDictionary对象

    ConcurrentDictionary<int, List<a>> dic = new ConcurrentDictionary<int, List<a>& ...

  5. 学习笔记CB010:递归神经网络、LSTM、自动抓取字幕

    递归神经网络可存储记忆神经网络,LSTM是其中一种,在NLP领域应用效果不错. 递归神经网络(RNN),时间递归神经网络(recurrent neural network),结构递归神经网络(recu ...

  6. FlexRay通信机制

    通信周期是 FlexRay 的基本通信单元[6~7,19].每个通信周期包括四个时间层,如图 2-9 所示.通信周期由静态段(Static Segment).动态段(Dynamic Segment). ...

  7. 【java编程】java的关键字修饰符

    一.transient java语言的关键字,变量修饰符,如果用transient声明一个实例变量,当对象存储时,它的值不需要维持.换句话来说就是,用transient关键字标记的成员变量不参与序列化 ...

  8. Linux内核笔记:内存管理

    逻辑地址由16位segment selector和offset组成 根据segment selector到GDT或LDT中去查找segment descriptor 32位base,20位limit, ...

  9. Yii2 使用 QQ 和 Weibo 第三方登录源码

    我们社区在 yii2-authclient 多次升级后,登录异常.一直想寻求一种通用的方法,尽量不重写 OAuth2, BaseOAuth 以及 OAuthToken 类, 所以本次直接在 initU ...

  10. 18.17 U-Boot+内核移植

    18.17.1 移植U-Boot-2012.04.08 1.下载.建立source insight工程.编译.烧写.如果无运行分析原因. $ .tar.bz2 $ cd u-boot- $ make ...