In this article I will share how to retrieve hidden value from Grid View Column.
I had a assignment I need to show only description and not ID. By using Datakeynames property you will get the selected row primary key.
Take a look at the page load if you are binding on post back then the values get updated before you are able to access them.
Follow this link for more details --While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference.