Solved

Vb.net Datagridview image column/row click event

Posted on 2010-11-08
4
1,810 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
[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
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

630 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