Hi I am making an application in C#.

**What I am trying to achieve**

* I select Multiple rows with *CTRL* among results in *DataGridView*
* then I right click on it and it shows options
* I Click onto *choose selected* option
* The *chosen rows* stays on the *DataGridView* and other rows are removed

**Problem where I got stuck**

* I select Multiple rows with *CTRL*
* But when I Right Click on the rows the multiple selection vanishes

Note: I am using MouseClick Event for right click on rows and generate a menu. The code of this event is given below:

```
private void SearchPanelDataGridView_MouseClick(object sender, MouseEventArgs e)
{
    if (e.Button == MouseButtons.Right)
    {
        ContextMenuStrip smenu = new System.Windows.Forms.ContextMenuStrip();
        var htest = SearchPanelDataGridView.HitTest(e.X, e.Y);
        SearchPanelDataGridView.ClearSelection();
        SearchPanelDataGridView.Rows[htest.RowIndex].Selected = true;

        smenu.Items.Add("Clear Record").Name = "Clear Record";
        smenu.Items.Add("Pay Amount").Name = "Pay Amount";
        smenu.Items.Add("Break Apart").Name = "Break Apart";
        smenu.Items.Add("View Details").Name = "View Details";
        smenu.Items.Add("Choose Selected").Name = "Choose Selected"; // Choose Rows Option
        smenu.Items.Add("Reset").Name = "Reset";

        int CurrentMouseOverRow = SearchPanelDataGridView.HitTest(e.X, e.Y).RowIndex;
        smenu.Show(SearchPanelDataGridView, new Point(e.X, e.Y));
        smenu.ItemClicked += new ToolStripItemClickedEventHandler(smenu_ItemClicked);
    }
}

```