• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 172
  • Last Modified:

delete event for datagridview?

Hello,
on datagridview's, when you hit delete, it deletes the selected row. How do I achieve the same event using code?
Something like below but not sure what the actual code is.


Private_button click
{
Delete Seleceted Row
}

thanks!
0
JasonWinn
Asked:
JasonWinn
1 Solution
 
e1vCommented:
Try:

yourDataGridView.Rows.Remove(yourDataGridView.CurrentRow);
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now