I have a class Model:
class pessoaModel
{
int id;
DateTime data;
TimeSpan hora;
CliModel ID_Cliente = new CliModel ();
public string Nome
{
get { return nome; }
set { nome = value; }
}
public int ID
{
get { return id; }
set { id = value; }
}
public TimeSpan Hora
{
get { return hora; }
set { hora = value; }
}
public DateTime Data
{
get { return data; }
set { data = value; }
}
public CliModel cliModel
{
get { return CliModel ; }
set { CliModel = value; }
}
}
That is populated through the information recorded in the database. I need my DisplayMember to have the Name + Date + Time + CliModel.Name I need the ValueMember to be equal to ID.
I'm trying to do as follows
chkAtendimento.DataSource = listaAtendimento;
chkAtendimento.DisplayMember = "Nome" + "Data" + "Hora" + "CliModel.Nome"
chkAtendimento.ValueMember = "Id";
But the information I put in does not appear. How do I get the information to appear the way I need it?