当前位置:网站首页>DevExpress.XtraEditors.DataNavigator用法
DevExpress.XtraEditors.DataNavigator用法
2022-07-26 07:21:00 【51CTO】
作者:jiankunking
1、DevExpress.XtraEditors.DataNavigator刚拖到winform窗体上的样子:

设置DataNavigator控件属性Dock=Bottom;TextLocation=End;TextStringFormat=第 {0}页 ,共 {1}页;
如果想显示ToolTip,需把ShowToolTips设置为True. 设置Button的Hint为自己想要显示的内容即可。
比如:

在运行时会有下面效果:

上图中的首页、前一页、后一页、尾页的图片是自定义的,那么怎么使用自定义图片呢?
拖拽一个imageList控件,然后在imageList中选择要使用的自定义图片

然后在Buttons选项卡下将ImageList设置为刚才选择过图片的imageList1控件,然后在DataNavigator控件 buttons下选择荼盘即可,比如下图的First

按钮事件处理:
dev官方文档:
DataNavigator Class |
The control that enables navigation through records in a data source and provides common record operations.
Namespace: DevExpress.XtraEditors
Assembly:
DevExpress.XtraEditors.v14.2.dll
Syntax
public class DataNavigator : NavigatorBase, IDataNavigatorOwner |
C# | VB |
Remarks
The DataNavigator control is used to navigate through records in a data source and perform operations against the data. It is derived from the NavigatorBase class, and so it inherits properties and methods common to all data navigation controls.
The data navigator displays built-in buttons that enable a user to scroll forward or backward through records one at a time, go to the first record, go to the last record, insert a new record, post data changes, cancel data changes and delete a record. You can also add custom buttons, when required. To access built-in and custom buttons, use the Buttons property. To perform custom actions on button clicks, handle the NavigatorBase.ButtonClick event.
The DataNavigator control needs to be associated with a data source in order to receive and manipulate data. Use the DataSource and DataMemberproperties for binding.
The
DataNavigator can display a text string that specifies the current record and the total record count in the associated data source. Use the NavigatorBase.TextLocation
and NavigatorBase.TextStringFormat
to customize the display of this text.
地址: https://documentation.devexpress.com/#WindowsForms/clsDevExpressXtraEditorsDataNavigatortopic
边栏推荐
- PR subtitle production
- Lite actor: lightweight optimization of ark actor concurrency model
- Unity3d asynchronous loading of scenes and progress bar loading
- 4. Data integrity
- 6、MySQL数据库的备份与恢复
- How can man Bang write a new footnote to the value of the industry's first social responsibility report?
- It's another summer of open source. 12000 project bonuses are waiting for you!
- Yolov5 improvements: add attention mechanism (video tutorial)
- 5. Multi table query
- 404 page best practices to improve user experience
猜你喜欢

NFT数字藏品系统开发:数字藏品赋予品牌新活力

It's another summer of open source. 12000 project bonuses are waiting for you!

Summer Challenge harmonyos - hamster game based on arkui (JS)

4. Data integrity

MySQL installation tutorial - hands on installation

中国联通改造 Apache DolphinScheduler 资源中心,实现计费环境跨集群调用与数据脚本一站式访问
![[C language] do you really know printf? (printf is typically error prone, and collection is strongly recommended)](/img/59/cf43b7dd16c203b4f31c1591615955.jpg)
[C language] do you really know printf? (printf is typically error prone, and collection is strongly recommended)

又是一年开源之夏,1.2万项目奖金等你来拿!

Solve the problem that Chrome browser is tampered with by drug bullies

HCIP---MPLS详解和BGP路由过滤
随机推荐
[C language] do you really know printf? (printf is typically error prone, and collection is strongly recommended)
成为 Apache 贡献者,So easy!
Redis系列之什么是布隆过滤器?
Tips when entering a formula in latex
NFT digital collection system development: the collision of literature + Digital Collections
From scratch, we will completely develop an online chess game [Gobang] Based on websocket, and only use dozens of lines of code to complete all the logic.
HCIP --- MPLS技术
Solve the problem that Chrome browser is tampered with by drug bullies
A guide for you to fully use TS
DaemonSet
每周小贴士#142:多参数构造函数和explicit
Opencv learning drawing shapes and text
NFT数字藏品系统开发:企业如何开发属于自己的数藏平台
anaconda安装教程-手把手教你安装
Why can't extern compile variables decorated with const?
This section is for Supplement 2
达人专栏 | 还不会用 Apache Dolphinscheduler?大佬用时一个月写出的最全入门教程【三】
Qt:模态非模态、文本框、按钮、单行输入框
Apache dolphin scheduler version 3.0.0-beta-1 was released, and flinksql and Zeppelin task types were added
Airiot IOT platform enables the container industry to build a welding station information monitoring system