My Name is Kay....

DIY , 먹방 , 개발 , 육아 , 여행 좋아합니다.
AdBlock 사용시 화면이 정상적으로 노출되지 않습니다.
포스팅 관련 문의 및 개발 문의는 Email : wkzkfmxksi@gmail.com

추가 포스팅이 이뤄지지 않는 블로그입니다. 문의는 wkzkfmxksi@gmail.com 으로 연락주세요.
kay
조회 수 9514 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

Null / Empty 값일 경우 체크하기


int i = dataGridView1.Rows.Count;
for (int j = 0; j < i; j++)
{
	string strCol2 = null;
	string strCol3 = null;
	if (dataGridView1.Rows[j].Cells[1].Value == null || dataGridView1.Rows[j].Cells[1].Value == DBNull.Value )
		strCol2 = "----";
	else
		strCol2 = dataGridView1.Rows[j].Cells[1].Value.ToString();

	if (dataGridView1.Rows[j].Cells[2].Value == null || dataGridView1.Rows[j].Cells[2].Value == DBNull.Value )
		strCol3 = "----";
	else
		strCol3 = dataGridView1.Rows[j].Cells[2].Value.ToString();
}
?

  1. ComboBox Option ( Add , Set , Get )

    Date2013.07.10 CategoryC# Bykay Views16002
    Read More
  2. Confirm Massage 창 띄우기

    Date2013.07.22 CategoryC# Bykay Views13001
    Read More
  3. [담아온글] For vs Foreach Performance 속도 대결

    Date2013.09.04 CategoryC# Bykay Views11800
    Read More
  4. C# 외부 프로그램 실행하기 ( Process.Start )

    Date2013.08.06 CategoryC# Bykay Views10548
    Read More
  5. TextBox 에서 줄바꿈 넣기

    Date2013.07.22 CategoryC# Bykay Views10389
    Read More
  6. DataGridView 에서 Cells 값 Null/Empty 체크하기

    Date2013.07.22 CategoryC# Bykay Views9514
    Read More
  7. 폼에서 새폼 열고 자신은 완전히 닫기.

    Date2013.07.26 CategoryC# Bykay Views7607
    Read More
  8. C# FTP 이용시 유용한 클래스

    Date2014.09.29 CategoryC# Bykay Views6185
    Read More
  9. dataGridView 내용 정렬 ( DefaultCellStyle , ColumnHeadersDefaultCellStyle )

    Date2013.07.08 CategoryC# Bykay Views5877
    Read More
  10. DataGridViewComboBoxColumn Change 이벤트 Value 값 가져오기

    Date2013.09.02 CategoryC# Bykay Views5369
    Read More
  11. appSettings 값 추가하기 , 읽어오기 , 값 존재 유무 체크

    Date2013.12.23 CategoryC# Bykay Views5237
    Read More
  12. C# 엑셀데이터 읽어서 디비에 저장

    Date2014.10.14 CategoryC# Bykay Views5127
    Read More
  13. 엑셀 내보내기 , Exporting DataGridview To Excel

    Date2013.08.08 CategoryC# Bykay Views5117
    Read More
  14. DataGridView ComboBox editingcontrolshowing 이벤트 걸기

    Date2013.09.04 CategoryC# Bykay Views4693
    Read More
  15. 엑셀 내보내기 , Exporting SQL To Excel

    Date2013.09.05 CategoryC# Bykay Views4328
    Read More
  16. 화면 캡쳐하기

    Date2013.09.02 CategoryC# Bykay Views4058
    Read More
  17. 파일 읽기 , 복사 , 삭제 , 쓰기 , 파일 유무

    Date2013.09.27 CategoryVB Bykay Views3950
    Read More
  18. SqlCommand 재사용(Reuse) 하기

    Date2013.07.10 CategoryC# Bykay Views3919
    Read More
  19. TextBox KeyEvent 엔터 이벤트 실행하기

    Date2013.07.26 CategoryC# Bykay Views3838
    Read More
  20. MDI 폼 이동 및 시작 폼 설정하기

    Date2013.07.09 CategoryC# Bykay Views3429
    Read More
Board Pagination Prev 1 2 Next
/ 2