1
I have a screen that I consult clients and fill a grid with the information coming from the bank, my project is separated by layers until where I am works, but I can not fill the grid with some information, I have the following situation within the for each
:
Cliente cliente = new Cliente();
cliente.Pessoa = new Pessoa();
cliente.Pessoa.IdPessoa = Convert.ToInt32(linha["IdPessoaCliente"]);
cliente.Pessoa.Nome = Convert.ToString(linha["Nome"]);
cliente.DataCadastro = Convert.ToDateTime(linha["DataCadastro"]);
cliente.DataAlteracao = Convert.ToDateTime(linha["DataAlteracao"]);
cliente.LimiteCompra = Convert.ToDecimal(linha["LimiteCompra"]);
cliente.Ativo = Convert.ToBoolean(linha["Ativo"]);
cliente.Pessoa.PessoaTipo = new PessoaTipo();
cliente.Pessoa.PessoaTipo.IdPessoaTipo = Convert.ToInt32(linha["IdPessoaTipo"]);
cliente.Pessoa.PessoaTipo.Descricao = Convert.ToString(linha["Descricao"]);
clienteColecao.Add(cliente);
The fields of grid that comes directly from client as for example cliente.DataCadastro
carries normal, but what is cliente.Pessoa.IdPessoa
in the grid appears written "transfer object", or if I customize the grid nothing comes and when threshing I see that cliente.Pessoa.IdPessoa
the IdPessoa
has the correct value but Pessoa
is written Objeto
transfer exactly what goes to the grid.
This "Gridview" you mention, in Winforms, you want to refer to "Datagridview"?
– Metalus
That’s right, Metalus.
– Genival J. Costa