Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

VGridControl.RecordCountChanged Event

Occurs when the number of visible records is changed.

Namespace: DevExpress.XtraVerticalGrid

Assembly: DevExpress.XtraVerticalGrid.v24.2.dll

NuGet Packages: DevExpress.Win.Navigation, DevExpress.Win.VerticalGrid

#Declaration

public event EventHandler RecordCountChanged

#Event Data

The RecordCountChanged event's data class is EventArgs.

#Remarks

This event occurs when the number of visible records is changed. This happens in the following cases:

  • A record is added or deleted.
  • A filter is applied that changes the number of visible records.

#Example

The following code snippet handles the VGridControl.RecordCountChanged event. The event handler updates the Vertical Grid’s caption (VGridControlBase.Caption) to display the visible record count and total record count.

Vertical Grid - Caption

See the following demo for the complete code: Run Demo: PC Market

vGridControl1.OptionsView.ShowCaption = true;
//...
// RecordCountChanged event handler:
void OnRecordCountChanged(object sender, System.EventArgs e) {
    UpdateCaption(vGridControl1.RecordCount, configurations.Count);
}
void UpdateCaption(int visible, int total) {
    vGridControl1.Caption = string.Format("Showing {0:n0} out of {1:n0} configurations", visible, total);
}
See Also