티스토리 뷰
protected void getGridMerge(GridView grid) { int RowSpan = 1; int ColCNT = 1; //병합을 해야하는 컬럼 index for (int j = 0; j < grid.Columns.Count - 1; j++) { if (grid.Columns[j].Visible && j == ColCNT) { for (int i = grid.Rows.Count - 1; i > 0; i--)//아이템 검색 { System.Web.UI.Control bfControl = grid.Rows[i - 1].Cells[j].Controls[1]; System.Web.UI.Control afControl = grid.Rows[i].Cells[j].Controls[1]; System.Web.UI.WebControls.Label bflbl = bfControl as System.Web.UI.WebControls.Label; System.Web.UI.WebControls.Label aflbl = afControl as System.Web.UI.WebControls.Label; if (bflbl.Text == aflbl.Text) { RowSpan++; grid.Rows[i - 1].Cells[j].RowSpan = RowSpan; //RowSpan // GridView1.Rows[i - 1].Cells[1].BackColor = Color.Gainsboro; //배경색 grid.Rows[i].Cells[j].Visible = false; grid.Rows[i].Cells[j].Controls[1].Visible = false; } else { RowSpan = 1; } } } } }
'프로그래밍 > ASP.NET' 카테고리의 다른 글
ASP.NET 웹 응용 프로그램을 실행할 때 "System.Data.OleDb.OleDbException" 오류 (0) | 2012.06.20 |
---|---|
[HOONS] 그리드에서 셀병합하기 (RowSpan,ColSpan) (0) | 2012.05.26 |
포맷형식. 천단위마다 콤마찍고 소수점 둘째자리까지 나타내기. (0) | 2012.05.14 |
GridView 종합정보 (0) | 2012.05.08 |
그리드뷰 로우 에디트 (0) | 2012.05.07 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- 셀렉터
- SVG
- WebApi
- workbook
- Style
- WCF
- radius
- jQuery
- 자바스크립트
- Excel
- jquery chart
- rowspan
- drag&drop
- css3
- JS
- ASP.NET
- CSS
- 프로시저
- MSSQL
- html5
- Ajax
- IE
- 저장프로시저
- grid
- Chart
- JavaScript
- 제이쿼리
- json
- Mobile
- jQuery Mobile
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함