Private Sub dgvEmployeedetails_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgvEmployeedetails.CellContentClick Public Event RowCommand As GridViewCommandEventHandler Dim i As Integer i = dgvEmployeedetails.CurrentRowIndex() dgvEmployeedetails.Item(.CurrentRowIndex, 0) dgvEmployeedetails.Item(.CurrentRowIndex, 1) End Sub where dgvEmployeedetails is data grid name. in which i have 2 colums which is number and name. my requirement is i should be able to select both columns when i click with mouse pointer in data grid and all data related to it must be retrived from database in appropiate fields. kindly help me how to code. to fulfil my above requirement
Dim ContactName As String ContactName = dgContactList.CurrentRow.Cells(0).Value
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)