Нумерация DataGrid строки слева направо-дисплей Дисплей
I am working for simple program about Time attendance that connect to Virdi FP devices. There is simple problem which is about numbering row in datagrid so I programmed Arabic application. When numbering datagrid it appears to left and I do not want this. I want it in right format so this is the code I used and the problem in Photo appears <pre lang="c#">var grid = sender as DataGridView; var rowIdx = (e.RowIndex + 1).ToString(); var leftFormat = new StringFormat() { Alignment = StringAlignment.Center, LineAlignment = StringAlignment.Center }; var headerBounds = new Rectangle(e.RowBounds.Left, e.RowBounds.Top, grid.RowHeadersWidth, e.RowBounds.Height); e.Graphics.DrawString(rowIdx, this.Font, SystemBrushes.ControlText, headerBounds, leftFormat);
Что я уже пробовал:
var grid = sender as DataGridView; var rowIdx = (e.RowIndex + 1).ToString(); var leftFormat = new StringFormat() { Alignment = StringAlignment.Center, LineAlignment = StringAlignment.Center }; var headerBounds = new Rectangle(e.RowBounds.Left, e.RowBounds.Top, grid.RowHeadersWidth, e.RowBounds.Height); e.Graphics.DrawString(rowIdx, this.Font, SystemBrushes.ControlText, headerBounds, leftFormat);