Solved

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

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
C# Service FileSystemwatcher isse 9 46
Making exceptions for ValidationAttribute 2 23
Securing WEBAPI on Azure 2 22
locate sql commands in C# visual studio Project 6 37
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…
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
The viewer will learn how to dynamically set the form action using jQuery.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

756 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