Darrell Embrey (DarrellE)
BCBS Michigan
Business Application Developer, Advanced
BCBS Michigan
DarrellE Member since 2016 12 posts
BCBS Michigan
Posted: June 28, 2021
Last activity: August 3, 2021
Posted: 28 Jun 2021 11:29 EDT
Last activity: 3 Aug 2021 9:32 EDT

Get Value From DataGridView Cell

How do I get the value of an item in a datagridview (dgv) cell?

My project has a windows form with a datagridview. The data source for the dgv is the results of a query. The columns of the dgv displays information for items to be processed. The primary key from the database row is in a hidden column. The multiselect property of the dgv is set to false. The user selects a row in the dgv and clicks a button on the form to begin processing. I need to place the primary key value into a variable to use for SQL query parameters in other automations.

I tried using the dgv current row cells get item method, but the method returns a DataGridViewCell object. 

***Edited by Moderator Marissa to update Platform Capability tags****
Robotic Process Automation Robotics System Architect