Extended Posted May 16, 2016 Share Posted May 16, 2016 (edited) DataGridView de herhangi bir row a sağ tıklayınca sağ tik menü çıkartıp işlem yaptırabileceğim bir proje örneği verebilir misiniz? Ben sağa tıklamasını algılattım fakat menü çıkartma işlemini çözemedim. Edited May 16, 2016 by Extended Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted May 16, 2016 Editor Share Posted May 16, 2016 Please register to see this content. 2 Quote Link to comment Share on other sites More sharing options...
korasoglu Posted May 16, 2016 Share Posted May 16, 2016 Spoiler private void dataGridView2_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e) { if (e.RowIndex != -1 && e.ColumnIndex != -1) { if (e.Button == MouseButtons.Right) { DataGridViewRow rowsagtik = (sender as DataGridView).Rows[e.RowIndex]; if (!rowsagtik.Selected) dataGridView1.CurrentCell = rowsagtik.Cells[e.ColumnIndex]; var mousePosition = dataGridView1.PointToClient(Cursor.Position); kayit.Show(dataGridView1, mousePosition); } } } private void dataGridView1_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e) { if (e.Button == MouseButtons.Right) { dataGridView1.CurrentCell = dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex]; dataGridView1.Rows[e.RowIndex].Selected = true; dataGridView1.Focus(); ad = dataGridView1.CurrentRow.Cells[0].Value.ToString(); soyad = dataGridView1.CurrentRow.Cells[2].Value.ToString(); } } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.