| 123456789101112131415161718192021 |
- using DevExpress.XtraGrid.Views.Grid;
- namespace UAS_DeviceMonitor.CustomerControl.GridViewWithSerialNum
- {
- public partial class GridViewWithSerialNum : GridView
- {
- public GridViewWithSerialNum()
- {
- InitializeComponent();
- IndicatorWidth = 30;
- }
- private void GridViewWithSerialNum_CustomDrawRowIndicator(object sender, RowIndicatorCustomDrawEventArgs e)
- {
- if (e.Info.IsRowIndicator && e.RowHandle >= 0)
- {
- e.Info.DisplayText = (e.RowHandle + 1).ToString();
- }
- }
- }
- }
|