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
Solved

Vb.net Datagridview image column/row click event

Posted on 2010-11-08
4
1,767 Views
Last Modified: 2012-05-10
I plan use a datagridview with imagecolumn. When user click in the cell a question is made if, he want delete row. How can catch row and cell position.
0
Comment
Question by:rflorencio
  • 2
4 Comments
 
LVL 42

Accepted Solution

by:
sedgwick earned 500 total points
ID: 34083781
you can use DataGridView.CellClick Event:http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.cellclick.aspxprivate void dataGridView1_CellClick(object sender,    DataGridViewCellEventArgs e){    DataGridViewImageCell cell = (DataGridViewImageCell)        dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex];}
0
 
LVL 26

Expert Comment

by:Shaun Kline
ID: 34083797
A better approach would be to attach javascript to the onclick (javascript) event to ask the question. This would prevent a round trip to the server just to ask the question. You can attach the javascript using the OnRowDataBound event.
0
 

Author Comment

by:rflorencio
ID: 34083948
shaun, sorry the code is vb.net, not asp.net
0
 
LVL 42

Expert Comment

by:sedgwick
ID: 34083976
@rflorencio,  test my code?
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Get hold of longitude and latitude in iframe string 11 48
VB: Convert 2 dates to specific format 24 52
How to limit User Input 2 27
System.net.Sockets Error 5 26
This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…

840 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