here is my code:
this is my select query where I concatenated the firstname, lastname, and middle initial..(and display it on the data grid)
Private Sub DisplayListOfPosition()
query = "SELECT profNo as 'No', CONCAT(profFName,', ', profLName, ' ', profMI,'.') as 'Name', profAddress
as 'Address', gender as 'Gender' FROM tbl_professor_bs"
FillDBGrid(query, Me.dgvProfessor_bs)
Me.txtProfNo_bs.Enabled = False
End Sub
I used cellclick on the other forms so that the data in the grid would display in textboxes.. my problem is, how would I display the concatenated columns in different textboxes?
this is my code(unfinished):
Private Sub dgvProfessor_bs_CellClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgvProfessor_bs.CellClick
DefaultValue()
Me.txtProfNo_bs.Text = Me.dgvProfessor_bs.Rows(e.RowIndex).Cells(0).Value.ToString()
Me.txtProfFName_bs.Text = Me.dgvProfessor_bs.Rows(e.RowIndex).Cells(1).Value.ToString()
End Sub
thank you in advance for your help! :)