windowsforms-devexpress-dot-xtraeditors-dot-navigatorbuttonbase-c50e8b43.md
Gets the button’s type.
Namespace : DevExpress.XtraEditors
Assembly : DevExpress.XtraEditors.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[Browsable(false)]
public virtual NavigatorButtonType ButtonType { get; }
<Browsable(False)>
Public Overridable ReadOnly Property ButtonType As NavigatorButtonType
| Type | Description |
|---|---|
| NavigatorButtonType |
The NavigatorButtonType.Custom value.
|
Available values:
Show 12 items
| Name | Description |
|---|---|
| Custom |
Reserved for future use.
| | First |
Sets the current record to the first record in the data source.
| | PrevPage |
When using the DataNavigator , changes the current record position in a data source by the DataNavigatorButtons.PageRecordCount property value backwards. In case of the ControlNavigator , changes the current record position in a data source by the count of visible onscreen records backwards.
| | Prev |
Sets the current record to the previous record in the data source.
| | Next |
Sets the current record to the next record in the data source.
| | NextPage |
When using the DataNavigator , changes the current record position in a data source by the DataNavigatorButtons.PageRecordCount property value upwards. In case of the ControlNavigator , changes the current record position in a data source by the count of visible onscreen records upwards.
| | Last |
Sets the current record to the last record in the data source.
| | Append |
Inserts a new record after the last one.
| | Remove |
Deletes the current record and makes the next record the current record.
| | Edit |
Sets the dataset to the edit state.
| | EndEdit |
Posts edited record value to the associated data source.
| | CancelEdit |
Cancels edits to the current record.
|
The ButtonType property is overridden in derived classes to return the type of a single button.
The following code snippets (auto-collected from DevExpress Examples) contain references to the ButtonType property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
how-to-use-richeditcontrol-in-bound-mode/CS/Form1.cs#L32
private void dataNavigator1_ButtonClick(object sender, DevExpress.XtraEditors.NavigatorButtonClickEventArgs e) {
if (e.Button.ButtonType == NavigatorButtonType.EndEdit)
richEditControl1.Modified = false;
winforms-grid-linq-to-sql-master-detail/CS/LinqWithEditing/Form1.cs#L30
private void gridControl1_EmbeddedNavigator_ButtonClick(object sender, DevExpress.XtraEditors.NavigatorButtonClickEventArgs e) {
if(e.Button.ButtonType == DevExpress.XtraEditors.NavigatorButtonType.EndEdit) {
ColumnView view = (ColumnView)gridControl1.FocusedView;
winforms-grid-sql-pagination/CS/DxSample/MainForm.cs#L47
private void EmbeddedNavigator_ButtonClick(object sender, NavigatorButtonClickEventArgs e) {
if (e.Button.ButtonType != NavigatorButtonType.Custom) return;
e.Handled = true;
private void OnGridControlEmbeddedNavigatorButtonClick(object sender, NavigatorButtonClickEventArgs e) {
if (e.Button.ButtonType == NavigatorButtonType.Remove) {
((XPBaseObject)((GridView)gridControl1.FocusedView).GetFocusedRow()).Delete();
Private Sub OnGridControlEmbeddedNavigatorButtonClick(ByVal sender As Object, ByVal e As NavigatorButtonClickEventArgs) Handles gridControl1.EmbeddedNavigator.ButtonClick
If e.Button.ButtonType = NavigatorButtonType.Remove Then
CType(CType(gridControl1.FocusedView, GridView).GetFocusedRow(), XPBaseObject).Delete()
how-to-use-richeditcontrol-in-bound-mode/VB/Form1.vb#L29
Private Sub dataNavigator1_ButtonClick(ByVal sender As Object, ByVal e As NavigatorButtonClickEventArgs)
If e.Button.ButtonType = NavigatorButtonType.EndEdit Then richEditControl1.Modified = False
BeginInvoke(New MethodInvoker(AddressOf UpdateCommandsState))
winforms-grid-linq-to-sql-master-detail/VB/LinqWithEditing/Form1.vb#L32
Private Sub gridControl1_EmbeddedNavigator_ButtonClick(ByVal sender As Object, ByVal e As DevExpress.XtraEditors.NavigatorButtonClickEventArgs) Handles gridControl1.EmbeddedNavigator.ButtonClick
If e.Button.ButtonType = DevExpress.XtraEditors.NavigatorButtonType.EndEdit Then
Dim view As ColumnView = CType(gridControl1.FocusedView, ColumnView)
winforms-grid-sql-pagination/VB/DxSample/MainForm.vb#L53
Private Sub EmbeddedNavigator_ButtonClick(ByVal sender As Object, ByVal e As NavigatorButtonClickEventArgs) Handles OrdersGrid.EmbeddedNavigator.ButtonClick
If e.Button.ButtonType <> NavigatorButtonType.Custom Then
Return
See Also