Solved

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

Posted on 2011-02-17
2
329 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 40

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Counting connections to SQL Server through C# 3 32
Web Form VB.Net  import CSV 4 36
Service Controller 1 23
Hey!! 5 33
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
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 …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

813 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

14 Experts available now in Live!

Get 1:1 Help Now