Thank you for writing.
@Boo - the AutoSizeColumnsMode property will fill the entire grid area with the columns, however, it will not change the width of the row header, as required.
Currently, it is not possible to dynamically set the width of the row header cell. However, there is a property, which allows you to set the width of all row headers cells in the control at once:
radGridView1.TableElement.RowHeaderColumnWidth = 100;
As already suggested, you should use the ViewCellFormatting event to achieve your scenario. More information about the formatting abilities of the control can be found in this documentation article: http://www.telerik.com/help/winforms/gridview-cells-formatting-cells.html
Alternative way of accessing the RowIndex
is to do it straight from the event arguments:
sender, CellFormattingEventArgs e)
GridRowHeaderCellElement && e.Row
e.CellElement.Text = (e.RowIndex + 1).ToString();
I hope that you find the provided information useful. Should you have any other questions, I will be glad to assist you.
the Telerik team