Hello,
I am generating the contents for my DGV by using the following code:
I would like to add a column containing an image to the end of the DGV.Code:Dim strMEDEWERKER As String = "IIf(isnull(tblMEDEWERKER.Voorvoegsel),tblMEDEWERKER.Voornaam & ' ' & tblMEDEWERKER.Achternaam,tblMEDEWERKER.Voornaam & ' ' &tblMEDEWERKER.Voorvoegsel & ' ' & tblMEDEWERKER.Achternaam)" Dim strComm As String = String.Format("SELECT tblMEDEWERKER.Medewerker_ID, " & _ "{0} AS VolledigeNaam, " & _ "tblMEDEWERKER.Postcode, " & _ "tblMEDEWERKER.Plaats, " & _ "tblMEDEWERKER.Achternaam, " & _ "tblMEDEWERKER.Voornaam, " & _ "tblMEDEWERKER.Voorvoegsel " & _ "FROM tblMEDEWERKER " & _ "WHERE {1} " & _ "AND {2} " & _ "AND {3} " & _ "AND {4} ", _ strMEDEWERKER, _ strZoekMedewerker_ID, _ strZoekPostcode, _ strZoekPlaats, _ strZoekVolledigeNaam) 'IIf(txtZoekPlaats.Text = "", "is null AND tblMEDEWERKER.Plaats <> NULL", "like '%" & txtZoekPlaats.Text & "%'"), _ 'Debug.WriteLine(strComm) 'Copy the string from the Debug window Dim adapter As New OleDbDataAdapter(strComm, connection) Dim table As New DataTable adapter.Fill(table) With dgvMedewerker .DataSource = table .Visible = True End With
I searched the forum but didn't find anything to fit my needs.
Could you please give me a push in the right direction?
Thanks in advance




Reply With Quote