'c#'에 해당되는 글 5건
- 2011.06.17 Partial 클래스 정의(C# 프로그래밍 가이드)
- 2011.05.30 sqlite
- 2011.05.16 DataGridView와 ContextMenu 연결
- 2011.05.16 DataGridView와 sqlite 테이블 연결하기
- 2011.05.16 MDI 창 만들기
SQLiteConnection cn = new SQLiteConnection(Form1.dbQuery);
cn.Open();
string SQL;
SQL = "SELECT users_id, name, username, place FROM users";
SQLiteCommand cmd = new SQLiteCommand(SQL, cn);
SQLiteDataAdapter da = new SQLiteDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);
DataTable dt = ds.Tables[0];
this.grid_userlist.DataSource = dt;
cn.Close();
'Programming > C#' 카테고리의 다른 글
DataTable에서 데이터 삭제 (0) | 2011.06.03 |
---|---|
DataTable에 데이터 추가 (0) | 2011.06.03 |
DataGridView와 ContextMenu 연결 (0) | 2011.05.16 |
DataGridView와 sqlite 테이블 연결하기 (0) | 2011.05.16 |
MDI 창 만들기 (0) | 2011.05.16 |
void dataGridView1_CellMouseUp(object sender, DataGridViewCellMouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
DataGridView grid = sender as DataGridView;
ContextMenuStrip menu = new ContextMenuStrip();
menu.Items.Add("Task1", null, new EventHandler(Task1_Click));
menu.Items.Add("Task2", null, new EventHandler(Task2_Click));
Point pt = grid.PointToClient(Control.MousePosition);
menu.Show(dataGridView1, pt.X, pt.Y);
}
}
'Programming > C#' 카테고리의 다른 글
DataTable에서 데이터 삭제 (0) | 2011.06.03 |
---|---|
DataTable에 데이터 추가 (0) | 2011.06.03 |
sqlite (0) | 2011.05.30 |
DataGridView와 sqlite 테이블 연결하기 (0) | 2011.05.16 |
MDI 창 만들기 (0) | 2011.05.16 |
'Programming > C#' 카테고리의 다른 글
DataTable에서 데이터 삭제 (0) | 2011.06.03 |
---|---|
DataTable에 데이터 추가 (0) | 2011.06.03 |
sqlite (0) | 2011.05.30 |
DataGridView와 ContextMenu 연결 (0) | 2011.05.16 |
MDI 창 만들기 (0) | 2011.05.16 |
메인 창 속성에서 IsMdiContainer 값을 True로 수정하면 메인창은 MDI 창이 된다.
메인창에서 차일드 창을 보여주려면 새로운 폼(여기서는 NewForm)을 생성하고
NewForm newForm = new NewForm();
newForm.MdiParent = this;
newForm.Show();
'Programming > C#' 카테고리의 다른 글
DataTable에서 데이터 삭제 (0) | 2011.06.03 |
---|---|
DataTable에 데이터 추가 (0) | 2011.06.03 |
sqlite (0) | 2011.05.30 |
DataGridView와 ContextMenu 연결 (0) | 2011.05.16 |
DataGridView와 sqlite 테이블 연결하기 (0) | 2011.05.16 |