DataSet ds = new DataSet();

                int count = ds.Tables["테이블명"].Rows.Count;
                if (count == 0)
                {
                    dataGrid1.DataSource = ds;
                    dataGrid1.DataMember = "테이블명";
                    dataGrid1.Refresh();
                    MessageBox.Show("검색 데이터가 없습니다", "확인");


                }
                else
                {
                    DataRow row = ds.Tables[0].Rows[0];
                    dataGridView1.DataSource = ds;
                    dataGridView1.DataMember = "테이블명";
                }



출처 : http://blog.naver.com/hjc426/130027312443

Posted by 요지
,