There are ways to do this:
1) Create a hidden or invisible column and bind it with ID, it won't be available for edit
2) You can even do the same thing by using DataKeys.
<asp:gridview runat="server" id="grid1" datakeynames="ID" xmlns:asp="#unknown">
</asp:gridview>
See below article:
How_to_edit_and_Delete_records_in_a_gridview_using_datakeys[
^]