Related To datageidview

Please support our VB.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
Thread Solved
Reply

Join Date: Nov 2008
Posts: 34
Reputation: manoj_582033 is an unknown quantity at this point 
Solved Threads: 0
manoj_582033 manoj_582033 is offline Offline
Light Poster

Related To datageidview

 
0
  #1
Dec 20th, 2008
Hi Friends

I am using a datagridview, there are four columns in that, & on fourth cell i have a button field, when i click on that i want to get the text of item(0) of selected row.

please help me to solve this
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 320
Reputation: cikara21 is an unknown quantity at this point 
Solved Threads: 63
cikara21's Avatar
cikara21 cikara21 is offline Offline
Posting Whiz

Re: Related To datageidview

 
0
  #2
Dec 20th, 2008
HINT :
  1. Dim sel_row_index As Integer
  2. Dim sel_col_index As Integer
  3.  
  4. Private Sub DataGridView1_CellClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellClick
  5. sel_row_index = e.RowIndex
  6. sel_col_index = e.ColumnIndex
  7. End Sub
  8.  
  9. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  10. MessageBox.Show(DataGridView1.Item(sel_col_index, sel_row_index).Value.ToString)
  11. End Sub
.:-cikara21-:.
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 34
Reputation: manoj_582033 is an unknown quantity at this point 
Solved Threads: 0
manoj_582033 manoj_582033 is offline Offline
Light Poster

Re: Related To datageidview

 
0
  #3
Dec 20th, 2008
Thanks It's Working
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Other Threads in the VB.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC