코드피아

고정 헤더 영역

글 제목

메뉴 레이어

코드피아

메뉴 리스트

  • HOME
  • TAG
  • MEDIA LOG
  • LOCATION LOG
  • GUEST BOOK
  • ADMIN
  • WRITE
  • 코드피아
    • Guitar 공연 영상
    • Gab's Studio
    • 부산아이러브기타
    • 김해미소산악회
    • 일상생활
    • 유용한글
    • 웃기는글
    • 영화
    • 미드
    • 미분류
      • Etc
    • C#
    • Java
    • Android
    • sesoleng
      • 원소 분석기
    • DataBase
      • Oracle
      • MS-SQL
    • 게임
      • ACEOnline

검색 레이어

코드피아

검색 영역

컨텐츠 검색

DataGridView

  • DataGridView 현재 선택된 행의 값 알아오기

    2011.06.01 by xarfox

  • How do I show multi-layered column headers?

    2011.05.18 by xarfox

  • Showing the data in a Datagrid from the database

    2011.01.05 by xarfox

  • Conditional formatting in Datagrid

    2011.01.05 by xarfox

  • Loading data from Text file to Grid View

    2011.01.05 by xarfox

  • 버턴을 클릭시 데이터 그리드의 선택 항목을 이동

    2010.10.27 by xarfox

  • 데이터그리그뷰 DATAGRIDVIEW 셀값에 따른 색상 변경

    2010.09.14 by xarfox

DataGridView 현재 선택된 행의 값 알아오기

현재 선택된 행의 값은 this.DataGridView.Rows[this.DataGridView.CurrentCellAddress.Y].Cells[0].Value.ToString() this.DataGridView.Rows[this.DataGridView.CurrentCellAddress.Y].Cells[1].Value.ToString() this.DataGridView.Rows[this.DataGridView.CurrentCellAddress.Y].Cells[2].Value.ToString() this.DataGridView.Rows[this.DataGridView.CurrentCellAddress.Y].Cells[3].Value.ToString()

C# 2011. 6. 1. 17:00

How do I show multi-layered column headers?

--------------------------------------------------------------- | January | February | March | | Win | Loss | Win | Loss | Win | Loss | --------------------------------------------------------------- Team1 | | | | | | | Team2 | | | | | | | TeamN | | | | | | | --------------------------------------------------------------- private void DgvColumnHeaderMerge_Load(object sender, EventArgs e) { this...

C# 2011. 5. 18. 21:53

Showing the data in a Datagrid from the database

The following set of code will show how to retrieve data from a database using DataGrid control. ***************************************************************************************************** In the code it is assumed that there is a table(Student) in MS Access database with two fields(sName & sRoll) containing some values or data. Now design a form with a DataGrid control and a button(Sh..

C# 2011. 1. 5. 10:44

Conditional formatting in Datagrid

This code snippet is to format the datagrid.For example our datagrid contains students details with mark.This code is for showing datagrid row with mark >60 in AliceBlue color [I]CODE FOR FILLING DATA IN DATAGRID void fill_products() { con.Open(); cmd.CommandText = "select * from student"; cmd.Connection = con; SqlDataAdapter adp = new SqlDataAdapter(); adp.SelectCommand = cmd; DataSet ds = new ..

C# 2011. 1. 5. 10:42

Loading data from Text file to Grid View

The following snippet is used to load data from text file to grid view. Step 1: suppose u have text file(Employee.text) with following data empid,empname 101,ganesh 102,manu 103,chandra 104,joseph 105,rutherford Step 2: Retreving the above text data and assigning to gridview //streamreader object is created for the text file StreamReader sr = new StreamReader(@"c:\employee.txt"); //dataset objec..

C# 2011. 1. 5. 10:40

버턴을 클릭시 데이터 그리드의 선택 항목을 이동

[상, 하] 버턴을 클릭시 데이터 그리드의 선택 항목을 이동 시키게 하는 방법 그리드 속성: MultiLine = false gd3.Rows[gd3.SelectedCells[0].RowIndex + 1].Selected = true; 그리드 속성: MultiLine = false, FullRowSelected = true gd3.Rows[gd3.SelectedRows[0].Index + 1].Selected = true;

C# 2010. 10. 27. 09:37

데이터그리그뷰 DATAGRIDVIEW 셀값에 따른 색상 변경

// RowPostPaint 이벤트를 이용한 각 행에 대한 배경색 변경하기 private void dGridView_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) { string remain_sec = string.Empty; try { remain_sec = dGridView[5, e.RowIndex].Value.ToString().Replace("초",""); int sec = Convert.ToInt32(remain_sec); if (sec

C# 2010. 9. 14. 11:54

추가 정보

인기글

최신글

페이징

이전
1
다음
TISTORY
코드피아 © Magazine Lab
페이스북 트위터 인스타그램 유투브 메일

티스토리툴바