Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 |
Tags
- hadoop
- Eclipse
- es6
- Sqoop
- NPM
- table
- R
- Java
- SSL
- 보조정렬
- plugin
- Python
- Spring
- SPC
- MSSQL
- xPlatform
- JavaScript
- SQL
- mapreduce
- IntelliJ
- react
- 공정능력
- Kotlin
- Express
- window
- tomcat
- mybatis
- Android
- GIT
- vaadin
Archives
- Today
- Total
DBILITY
C# 데이터그리드 ( DataGridView ) 일련번호 표시 본문
반응형
RowHeader에 표시하는건 많이 있던데,
특정셀에 해보았다. CellPaint시에..
var centerFormat = new StringFormat
{
Alignment = StringAlignment.Center,
LineAlignment = StringAlignment.Center
};
var cellBounds = new Rectangle(e.CellBounds.Left, e.CellBounds.Top, e.CellBounds.Width, e.CellBounds.Height);
e.PaintBackground(e.ClipBounds, true);
e.Graphics.DrawString(string.Format("{0}", e.RowIndex + 1),
e.CellStyle.Font,
new SolidBrush(e.CellStyle.ForeColor),
cellBounds, centerFormat);
e.Handled = true;
반응형
'C#' 카테고리의 다른 글
| c# Enumeration foreach (0) | 2019.02.15 |
|---|---|
| C# 클래스가 등록되지 않았습니다.(예외가 발생한 HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)) (0) | 2018.02.10 |
| 확장모듈 목록 (0) | 2018.01.20 |
| c# member property auto setter default value (0) | 2018.01.19 |
| c# applicationSettings read (0) | 2018.01.16 |
Comments