New to Telerik UI for WinFormsStart a free 30-day trial

Accessing and setting the CurrentCell

Updated over 6 months ago

In order to set the current cell of RadGridView, set the CurrentRow and CurrentColumn properties to respective row and column which cross at the desired cell:

C#
this.radGridView1.CurrentRow = this.radGridView1.Rows[1];
this.radGridView1.CurrentColumn = this.radGridView1.Columns[1];
this.Text = this.radGridView1.CurrentCell.Value.ToString();

Figure 1: Changing the current row changes the forms text.

WinForms RadGridView Changing the current row changes the forms text

Accessing the current cell

To get an instance of the current cell simply create a variable of type GridDataCellElement and assign to it the current cell:

C#
GridDataCellElement cell = radGridView1.CurrentCell;

The CurrentCell property can be null when you don't have CurrentRow or CurrentColumn.

See Also