DEV Gridcontrol 查询得到0条记录时显示自定义的字符提示/显示
来源:互联网 发布:python reduce 函数 编辑:程序博客网 时间:2024/05/30 23:30
private void gridView_CustomDrawEmptyForeground(object sender, DevExpress.XtraGrid.Views.Base.CustomDrawEventArgs e) { if (this.judge_ds(dsDt)) { string str = "没有查询到你所想要的数据!"; Font f = new Font("宋体", 10, FontStyle.Bold); Rectangle r = new Rectangle(e.Bounds.Top + 25, e.Bounds.Left + 25, e.Bounds.Right - 25, e.Bounds.Height - 25); e.Graphics.DrawString(str, f, Brushes.Black, r); } }
#region 判断ds是否为空 private bool judge_ds(DataSet ds) { bool flag = false; if (ds == null||ds.Tables.Count == 0||(ds.Tables.Count == 1 && ds.Tables[0].Rows.Count == 0)) { flag = true; } return flag; } #endregion
小注:
如果显示提示信息的位置不对可以通过调整,Rectangle函数后面的数字来实现。
作者:jiankunking 出处:http://blog.csdn.net/jiankunking 1 0
- DEV Gridcontrol 查询得到0条记录时显示自定义的字符提示/显示
- Dev -- GridControl 分组显示
- Dev -- GridControl 分组显示
- DEV Gridcontrol 格式化显示数据
- Dev、GridControl的模糊查询
- C# dev GridControl绑定数据不能显示
- Dev GridControl 有数据显示空行
- 用红色显示ASP查询数据时得到的记录关键词
- 关于Dev 控件里 gridcontrol 的gridview 显示序号和checkbox
- gridControl显示多表查询结果
- gridControl中图片的显示
- Dev GridControl控件绑定数据源,列不显示
- WPF dev GridControl 鼠标移上去显示Tooltip
- magento 自定义pager自定义每页显示多少条记录
- Dev GridControl 单元格错误提示
- oracle设置查询横向字符数了显示条数
- intellij idea 自定义选中字符的背景颜色和右侧滚动条上显示的颜色
- 显示记录条数的写法
- 网站建设运营常见的三个误区解读
- Mysql
- Eclipse10个最有用的快捷键
- 使用mysql-proxy 快速实现mysql 集群 读写分离
- Cloud Computing
- DEV Gridcontrol 查询得到0条记录时显示自定义的字符提示/显示
- python 好的学习博客
- Android OTA 升级之四:进入根文件系统
- 创建一个自定义 jQuery 插件
- poj 1515 Street Directions(双连通分量)
- 不错的js日历控件
- python+django初学之Eclipse Pydev 插件配置(二)
- Qt之日志输出文件
- Excel 快捷键大全