I don’t know why my code didn’t come out right above. Here it is again in plain text:
void loadClients()
{
gridClient.Rows.Clear();
List<Models.Client> clients = BunifuMapper.MapToList<Models.Client>(db.GetRows(“select * from clients where ‘ClientName’ LIKE ‘%” + txtSearch.Text.Trim() + “%'”));
foreach (var client in clients)
{
gridClient.Rows.Add(new object[] {
client.id,
client.ClientName,
client.Address,
client.PostalCode,
client.Country,
client.City
});
gridClient.Rows[gridClient.RowCount – 1].Tag = client;
}
}