.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Code Snippets >> DataGrid >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

How to Get a Select cell value in a DataGrid using c#

Posted By:Syed Shakeer Hussain       Posted Date: May 04, 2009    Points: 10    Category: DataGrid    URL: http://www.dotnetspark.com  
 

Double click on your Datagrid and write below code:

private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)

{

button1.Text = dataGridView1.CurrentCell.Value.ToString();

}


     

Further Readings:

Responses
Author: Indian         Company URL: http://www.dotnetspark.com
Posted Date: August 02, 2011

Hi

I want to display the data dynamically in a popup window.
My popup window has labels the data must be displayed in labels when i click on image in a gridview.

please help me out


Thanks in Advance


Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend