Hi @Kumar32490 ,
To open popup box or modal dialog in the visual web part . You need to use javascript to achieve this, you could refer to these articles:
How To Show And Hide A Modal Pop Up Dialog In A SharePoint 2013 Page Or A Visual WebPart
How To Programmatically Show Or Hide A Modal Popup Dialog With Server Side Code In Share Point 2013
You also need to get the item ID data in your grid to edit the corrsponding item. You could open the edit form page in the modal dialog to edit the item, the url of edit listitem is: http://yoursite/Lists/ListName/EditForm.aspx?ID=<ID>
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.