Solved

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

Posted on 2011-02-17
2
332 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

739 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