Hi All,
I have a RadGridView that is showing some odd formatting issues when it is resized. I am using the CellFormatting event to draw thick borders in the left side of the cells of a particular column to indicate a logical grouping of columns, however when I resize the grid this thick black left border appears in many other cells than the one I want it to.
Note: This worked fine until I updated my RadControls to Q1 2011.
So, here is my demo:
First I open the grid and all looks well. I am using the CellFormatting event to draw the thick left border of some cells.
-See Attached Image "FirstOpened.PNG"
I then resize the grid, shrinking it about halfway.
-See Attached Image "Halfway.PNG"
Finally, I resize the Grid back to it's original size, which results in the odd formatting. See that the thick left border has been applied to many cells and some BackColoring has also been changed.
-See Attached Image "OpenedAgain.PNG"
Here is my CellFormatting code:
Do I need to change the way I am formatting the grid? What has changed in this latest version that may have caused this?
Thanks in advance for any help ... I appreciate It!
-Matt
I have a RadGridView that is showing some odd formatting issues when it is resized. I am using the CellFormatting event to draw thick borders in the left side of the cells of a particular column to indicate a logical grouping of columns, however when I resize the grid this thick black left border appears in many other cells than the one I want it to.
Note: This worked fine until I updated my RadControls to Q1 2011.
So, here is my demo:
First I open the grid and all looks well. I am using the CellFormatting event to draw the thick left border of some cells.
-See Attached Image "FirstOpened.PNG"
I then resize the grid, shrinking it about halfway.
-See Attached Image "Halfway.PNG"
Finally, I resize the Grid back to it's original size, which results in the odd formatting. See that the thick left border has been applied to many cells and some BackColoring has also been changed.
-See Attached Image "OpenedAgain.PNG"
Here is my CellFormatting code:
private
void
grdHuntGroups_CellFormatting(
object
sender, Telerik.WinControls.UI.CellFormattingEventArgs e)
{
e.CellElement.BorderBoxStyle = Telerik.WinControls.BorderBoxStyle.FourBorders;
//Set back color based on service level
if
(e.CellElement.ColumnInfo.HeaderText.ToLower() ==
"soa"
)
{
e.CellElement.BackColor = Color.Yellow;
e.CellElement.DrawFill =
true
;
e.CellElement.GradientStyle = Telerik.WinControls.GradientStyles.Solid;
e.CellElement.BackColor = (Color)e.CellElement.RowInfo.Cells[
"SOABackColor"
].Value;
e.CellElement.ForeColor = (Color)e.CellElement.RowInfo.Cells[
"SOAForeColor"
].Value;
}
//Set thick border to seperate sections
if
(e.CellElement.ColumnInfo.HeaderText.ToLower() ==
"lg-out"
|| e.CellElement.ColumnInfo.HeaderText.ToLower() ==
"pres"
|| e.CellElement.ColumnInfo.HeaderText.ToLower() ==
"soa"
)
{
e.CellElement.BorderLeftWidth = 8.0f;
e.CellElement.BorderLeftColor = Color.Black;
e.CellElement.DrawBorder =
true
;
}
}
Do I need to change the way I am formatting the grid? What has changed in this latest version that may have caused this?
Thanks in advance for any help ... I appreciate It!
-Matt