반응형
데브익스프레스 윈폼 그리드컨트롤에서 그리드 선 다시 그리기.
GridControl_Paint(object sender, PaintEventArgs e) {
if (gridRowInfo == null)
return;
foreach(var gridRow in gridRowInfo) {
e.Graphics.DrawLine(new Pen(Color.Gray) {
DashStyle = System.Drawing.Drawing2D.DashStyle.Dot
}, new Point(gridRow.Bounds.X, gridRow.Bounds.Bottom), new Point(gridRow.Bounds.Right, gridRow.Bounds.Bottom));
foreach(var cellInfo in gridDataRow.Cells)e.Graphics.DrawLine(new Pen(Color.Gray) {
DashStyle = System.Drawing.Drawing2D.DashStyle.Dot
}, new Point(cellInfo.Bounds.Right, cellInfo.Bounds.Top), new Point(cellInfo.Bounds.Right, cellInfo.Bounds.Bottom));
}
}
출처
반응형