博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
GridControl分页
阅读量:1822 次
发布时间:2019-04-25

本文共 1402 字,大约阅读时间需要 4 分钟。

GridControl分页

参考:https://blog.csdn.net/sinat_27305053/article/details/80014441?utm_source=distribute.pc_relevant.none-task

  1. GridControl的UseEmbeddedNavigator属性值设为True
  2. EmbeddedNavigator属性\Buttons选择需要的按钮
gridView.GridControl.UseEmbeddedNavigator = true;            gridView.GridControl.EmbeddedNavigator.Buttons.Append.Visible = false;            gridView.GridControl.EmbeddedNavigator.Buttons.Edit.Visible = false;            gridView.GridControl.EmbeddedNavigator.Buttons.EndEdit.Visible = false;            gridView.GridControl.EmbeddedNavigator.Buttons.CancelEdit.Visible = false;            gridView.GridControl.EmbeddedNavigator.Buttons.Remove.Visible = false;
  1. EmbeddedNavigator属性\Buttons\TextStringFormat默认有两个参数,{0}{1} 分别对应当前选中行index,当前页行数。
gridView.GridControl.EmbeddedNavigator.TextStringFormat = "{0}in{1}";
  1. 事件:
gridView.GridControl.EmbeddedNavigator.ButtonClick += gridControl_EmbeddedNavigator_ButtonClick;private void gridControl_EmbeddedNavigator_ButtonClick(object sender, NavigatorButtonClickEventArgs e)        {
if (e.Button.ButtonType == NavigatorButtonType.Remove) {
if (MessageBox.Show("Do you want to delete the current row?", "confirm deletion", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) != DialogResult.Yes) {
e.Handled = true; } } }
你可能感兴趣的文章
python初学者入门学习笔记:数据结构列表
查看>>
python初学者入门学习笔记:数据结构集合
查看>>
python初学者入门学习笔记:数据结构字典
查看>>
python初学者入门学习笔记:循环
查看>>
python初学者入门学习笔记:条件/跳出与结束循环
查看>>
python初学者入门学习笔记:运算符与随机数
查看>>
python初学者入门学习笔记:关键字
查看>>
python初学者入门学习笔记:内置函数
查看>>
python:Requests+正则爬取网页数据
查看>>
Python:模拟 Ajax 请求抓取今日头条街拍美图
查看>>
python使用代理处理反爬抓取微信文章
查看>>
IP代理池之验证是否有效
查看>>
python反爬虫之搭建IP代理池
查看>>
python爬取回车桌面图片
查看>>
python实现简单爬虫功能
查看>>
99%的人都不知道的pandas骚操作(一)
查看>>
24式加速你的Python
查看>>
Scrapy爬取银行理财产品信息(共12多万条)并存入MongoDB
查看>>
python贪吃蛇源码分享
查看>>
Python爬取网易云音乐播放地址
查看>>