Articles in this section
Category / Section

How to get the alpha label name of the column and rows in WinForms GridControl?

1 min read

Row and column name

To get the alpha label name and Numeric label of a column/row, GridRangeInfo.GetAlphaLabel() and GridRangeInfo.GetNumericLabel() methods can be used.

C#

//Event Handler
this.grid.CellClick += new GridCellClickEventHandler(grid_CellClick);
 
void grid_CellClick(object sender, GridCellClickEventArgs e)
        {
            //Used to get the alpha label name of the column and rows
            MessageBox.Show("ColumnName: "+GridRangeInfo.GetAlphaLabel(e.ColIndex)+" and RowName: "+GridRangeInfo.GetNumericLabel(e.RowIndex));
        }

 

VB

'Event Handler
AddHandler grid.CellClick, AddressOf grid_CellClick
 
Private Sub grid_CellClick(ByVal sender As Object, ByVal e As GridCellClickEventArgs)
 'Used to get the alpha label name of the column and rows
 MessageBox.Show("ColumnName: " & GridRangeInfo.GetAlphaLabel(e.ColIndex) & " and RowName: " & GridRangeInfo.GetNumericLabel(e.RowIndex))
End Sub

 

Note:

In this sample, we have displayed the alpha label name and numeric label name in grid cell click.

 

 

Screenshot

Displays the row and column name

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied