I have a hierarchy RadGrid implementation which uses the AutoGenerateColumns pattern. In the RadGrid1_ColumnCreated event I'm setting the properties to align specific columns based on a list of column names which require right alignment.
The issue is when the grid is rendered the right aligned columns are overflowing the column width - see the MV Base column and the text only displays correctly when I click on the row. Attached is a screenshot of the issue showing 2 rows in the Details section. This behaviour is in IE8 - our company standard browser.
if (e.Column is GridBoundColumn)
{
GridBoundColumn boundColumn = e.Column as GridBoundColumn;
if (RightAlignColumnList.Contains(e.Column.UniqueName))
{
boundColumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Right; boundColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Right; boundColumn.DataFormatString = "{0:N0}"; boundColumn.HeaderStyle.Wrap = true; boundColumn.ItemStyle.Wrap = true;
}
else
{
boundColumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Left;
boundColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Left;
}
}The issue is when the grid is rendered the right aligned columns are overflowing the column width - see the MV Base column and the text only displays correctly when I click on the row. Attached is a screenshot of the issue showing 2 rows in the Details section. This behaviour is in IE8 - our company standard browser.