Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

pass a dataitem value from the gridview row to a custom event

Posted on 2011-02-17
2
Medium Priority
?
337 Views
Last Modified: 2012-05-11
I hv a grid view with the first column as checkbox, second column as clientName.
I want to write a OnCheckedChanged event and pass that rows clientName to the event, to append it to another Label text on the same page.

How do I pass the rows clientName to this custom event?

Thanks,

Deep
0
Comment
Question by:patd1
2 Comments
 
LVL 41

Expert Comment

by:Kyle Abrahams
ID: 34919642
http://stackoverflow.com/questions/932040/triggering-a-checkbox-value-changed-event-in-datagridview-c-net

You can probably use the CellMouseClick event to pass the info you need.  
0
 
LVL 11

Accepted Solution

by:
Sudhakar Pulivarthi earned 2000 total points
ID: 34922431
Hi,

You can try this way:
OnCheckedChanged you can get the current selected row in the grid.
Get the cell value of the clientName column.
Since its on the same page, set the value to a global variable/ set the value to the parameter in the event.
Call the event to append it to another Label text.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question