Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Please give me a solution if you know anybody.
Posted
Comments
Raje_ 24-Dec-15 2:22am    
Question is not clear. selected text means what?

1 solution

It's easy "x" is Row Position and "y" is Column position.

C#
string valueInGrid=datagridview1.Rows[x].Cells["ColumnName"].Value

string valueInGrid=datagridview1.Rows[x].Cells[y].Text
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900