In datagridview
has a date field in the format yyyyMMdd
and needs to display formatted in the correct form.
I tried this:
dgvRequisicao.Columns["data"].DefaultCellStyle.Format = "dd/MM/yyyy";
But instead of showing me the formatted date shows me dd/MM/yyyy
Edit:
Populate the grid like this:
BindingSource sbind = new BindingSource();
sbind.DataSource = dt;
dgv.DataSource = sbind;
Edit:
Here I load the datatable
of the bank
for (int i = 0; i < parametros.Length; i += 2)
cmd.Parameters.AddWithValue(parametros[i].ToString(), parametros[i + 1]);
OracleDataAdapter da = new OracleDataAdapter(cmd);
da.Fill(dt);
Thank you