Subscribe to Subscribers
Talk to Webmaster Tony John

Online Members

Asheej T K
More...

Forums » .NET » .NET »

how to find each cell value in gridview


Posted Date: 18 Dec 2008      Posted By:: vijaya bharathi     Member Level: Gold    Member Rank: 2098     Points: 1   Responses: 2



hi,

iam doing one asp.net application

in gridview i have 3 columns.

the first two column values are coming from database.

the third column is template field.here i have one radiobuttonlist control.i have two
options in radiobuttonlist.

for example


Employee dept attandance

bharathi finance a p (here iam selecting p)

vijaya ,, a p (p)

silpa ,, a p (p)

sandhya ,, a p (a)


here i want to put each employee attendance status is in session variable and pass it
to another page.from next page to pass it to crystal report.

so any one tell me how to find the each cell value of a particular column and store it into a session variable










Responses

#330496    Author: saravanakumar      Member Level: Gold      Member Rank: 0     Date: 18/Dec/2008   Rating: 2 out of 52 out of 5     Points: 1

hi,

try this to fetch the cell value of grid

grdid1.Rows[int.Parse(e.CommandArgument.ToString())].Cells['cell no']


regards,
saravan



 
#330506    Author: Pavan Ravi      Member Level: Gold      Member Rank: 149     Date: 18/Dec/2008   Rating: 2 out of 52 out of 5     Points: 3

dim d as int=0
for each gvRow as GridViewRow in GridView1.rows
dim strEmployee as string=gvRow.cells(0).text.trim
dim strPresent as string=iif(ctype(gvRow.cells(1).controls(0),radiobutton).checked,"P","A")
dim strAbsent as string=iif(ctype(gvRow.cells(2).controls(0),radiobutton).checked,"A","P")
response.write(strEmployee+" , "+strPresent +" , "+strAbsent+vbcrlf)
next

Regards,
Pavan Ravi Kumar.

"Complex problems have simple, easy to understand wrong answers."
App development, Maintenance & Trouble Shooting



 
Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.



Next : public static void main
Previous : how to send email to perticular mailid .net
Return to Discussion Forum
Post New Message
Category:

Related Messages
Active Members
TodayLast 7 Daysmore...

Awards & Gifts
Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
2005 - 2012 All Rights Reserved.
.NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
Articles, tutorials and all other content offered here is for educational purpose only.
We are not associated with Microsoft or its partners.