How to show and hide the Edit and Select links in a datagridview in asp.net

I have a DataGridView on my page that has the AutoGenerateSelectButton and AutoGenerateEditButton set to true. When the user clicks on the select link, the selected row is highlighted and information is displayed in another update panel on the page. When the user clicks on the Edit link they can edit the information in the gridview as well as the data displayed in the other UpdatePanel.

I need to prevent the user from clicking on the Edit link on any row except the one selected.

I tried to hide the Edit link using the following code in the RowCreated event:
e.Row.Cells[-].Controls[0].Visible = false

This also works great. Only the Edit link appears in the Selected row.

The problem occurs when I click on the Edit Link. I only get the Cancel link. I don't get the Update link. Can anyone tell me how to get the Update link to appear with my current setup? If I don't try and hide/show the Edit/Select links then when I click on Edit, the Update and Cancel links appear and work appropriately. Any help is greatly appreciated!