Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
2
Posts with Upvotes
2
Upvoting Members
2
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
0 Endorsements
Ranked #55.0K
~8K People Reached
Favorite Forums
Favorite Tags

3 Posted Topics

Member Avatar for Exaktor

You can do it in a simple way, that is right click on gridview then a popup menu will appear and delete the row. Here is the code sample.. if (e.Button == MouseButtons.Right) { this.dataGridView1.Rows[e.RowIndex].Selected = true; this.rowIndex = e.RowIndex; this.dataGridView1.CurrentCell = this.dataGridView1.Rows[e.RowIndex].Cells[1]; this.contextMenuStrip1.Show(this.dataGridView1, e.Location); contextMenuStrip1.Show(Cursor.Position); } Full Source code...[Datagridview …

Member Avatar for ChrisHunter
0
4K
Member Avatar for jeffreylee

try this code.. connetionString = "Data Source=ServerName;Initial Catalog=DatabaseName;User ID=UserName;Password=Password" cnn = new SqlConnection(connetionString); try { cnn.Open(); MessageBox.Show ("Connection Open ! "); cnn.Close(); } catch (Exception ex) { MessageBox.Show("Can not open connection ! "); } Source...[SQL Server Connection](http://csharp.net-informations.com/data-providers/csharp-sql-server-connection.htm) Watson

Member Avatar for vdixit01
0
837
Member Avatar for ddanbe

Datagridview right click and delete row... private void dataGridView1_CellMouseUp(object sender, DataGridViewCellMouseEventArgs e) { if (e.Button == MouseButtons.Right) { this.dataGridView1.Rows[e.RowIndex].Selected = true; this.rowIndex = e.RowIndex; this.dataGridView1.CurrentCell = this.dataGridView1.Rows[e.RowIndex].Cells[1]; this.contextMenuStrip1.Show(this.dataGridView1, e.Location); contextMenuStrip1.Show(Cursor.Position); } } Source...[Right click and delete from datagridview](http://csharp.net-informations.com/datagridview/deletegridview.htm) watson

Member Avatar for ddanbe
2
3K

The End.