if (e.ColumnIndex == 1 && e.RowIndex >= 0)
{
e.PaintBackground(e.CellBounds, true);
TextRenderer.DrawText(e.Graphics, e.FormattedValue.ToString(),
e.CellStyle.Font, e.CellBounds, e.CellStyle.ForeColor,
TextFormatFlags.RightToLeft | TextFormatFlags.Right);
e.Handled = true;
}
https://www.codeproject.com/Questions/133676/Change-the-RightToLeft-property-of-DataGridView-fo
the above is the code , i am using inside the cellpaint event to right align the text but the problem is it is aligning the text inside the cell after i finish editing the cell .
so i tried using
// this.Columns[0].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
but it gives me a run time error as initially my datagridview does not have any data . it is blank on load
I want that it should starts typing from the right to left mode (while being in editing mode) . Is it possible for a datagridview control to have such thing .
thanks in advance .