作者:jiankunking 出处:http://blog.csdn.net/jiankunking
1、DevExpress.XtraEditors.DataNavigator刚拖到winform窗体上的样子:
设置DataNavigator控件属性Dock=Bottom;TextLocation=End;TextStringFormat=第 {0}页 ,共 {1}页;
在运行时会有下面效果:
然后在Buttons选项卡下将ImageList设置为刚才选择过图片的imageList1控件,然后在DataNavigator控件 buttons下选择荼盘即可,比如下图的First
按钮事件处理:
The control that enables navigation through records in a data source and provides common record operations.
Namespace:DevExpress.XtraEditors
| |||
public class DataNavigator : NavigatorBase, IDataNavigatorOwner |
The DataNavigator control is used to navigate through records in a data source and perform operations against the data. It is derived from theNavigatorBase 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 theNavigatorBase.TextLocation and NavigatorBase.TextStringFormat to customize the display of this text.联系客服