본문 바로가기
develop

c# devExpress GridControl. Drawing line

by 파드 2023. 11. 13.
반응형

데브익스프레스 윈폼 그리드컨트롤에서 그리드 선 다시 그리기.

 

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));
    }
}

 

출처

https://supportcenter.devexpress.com/ticket/details/t544018/create-dotted-horizontal-and-vertical-grid-lines-in-gridview-winforms

 

Create Dotted Horizontal and Vertical Grid Lines in GridView Winforms

DevExpress.com and affiliated Developer Express Inc web properties will undergo routine maintenance between November 11-12, 2023. Access to DevExpress.com, the DevExpress Support Center, and affiliated websites will be limited during this maintenance perio

supportcenter.devexpress.com

 

 

 

반응형