Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old December 5th, 2006, 06:03 AM
Authorized User
 
Join Date: Nov 2006
Location: New Delhi, Delhi, India.
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to Get Specific Cell Value of Data Grid in C#

I want to fetch selected cell value from datagrid. How is it possible. Let me know about this. This is urgent. Pls
kumar Ashish
krashishroa@yahoo.co.in


Thanks and Regards
Kumar Ashish
9350789189
__________________
Thanks
Kumar Ashish
krashishroa@yahoo.co.in
Reply With Quote
  #2 (permalink)  
Old February 1st, 2007, 08:17 AM
Registered User
 
Join Date: Feb 2007
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi.
May be this will help you.

Suppose we have DataGrid grd;

int cur_row = grd.CurrentRowIndex; //getting current selected grid row
if(cur_row == -1)
  return; // if there is no selected row just exit of method

object val = grd[grd.CurrentCell]; //getting value of the current cell

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Retrieving Data Grid Cell Value Using Javascript dotnetsathya ASP.NET 1.0 and 1.1 Basics 0 October 23rd, 2008 03:00 AM
how data grid of vb.net add cell color Nuwang Forum and Wrox.com Feedback 0 September 10th, 2008 09:36 PM
Copy specific data in specific cells of sheet2 yogeshyl Excel VBA 1 May 14th, 2007 08:40 AM
Export Access Data to a Specific Cell in Excel. VBNoob Access VBA 1 December 14th, 2005 08:25 PM
validation of one cell of a Data Grid to another Ljhopkins ASP.NET 1.0 and 1.1 Basics 1 November 5th, 2005 01:53 AM



All times are GMT -4. The time now is 10:30 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.