Solved

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

Posted on 2011-02-17
2
327 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 39

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 500 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 your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
asp.net mvc5 3 35
comparing string in C# 3 33
C# Reverse int in fast ways 6 27
COnsume rest client 6 8
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
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 …

708 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now