I need to display "Active" or "Idle" in the Status column of the DataGridView , how do?
This"Situation" column is Boolean type:
This is the Code where I populate the DataGridView :
private void PreencherDataGridView()
{
try
{
ConvenioModel convenio = new ConvenioModel();
convenio.STATUS = rdbFiltroAtivo.Checked;
dgvConvenio.DataSource = ConvenioNegocio.ListarConvenioMedico(convenio);
dgvConvenio.Columns["ID_CONVENIO_MEDICO"].Visible = false;
dgvConvenio.Columns["CNPJ"].Width = 80;
dgvConvenio.Columns["RAZAO_SOCIAL"].Width = 150;
dgvConvenio.Columns["NM_FANTASIA"].Width = 150;
dgvConvenio.Columns["DT_CADASTRO"].Width = 50;
dgvConvenio.Columns["DT_ULT_ATUALIZACAO"].Width = 50;
dgvConvenio.Columns["STATUS"].Width = 30;
dgvConvenio.Columns["RAZAO_SOCIAL"].HeaderText = "RAZÃO SOCIAL";
dgvConvenio.Columns["NM_FANTASIA"].HeaderText = "NOME FANTASIA";
dgvConvenio.Columns["DT_CADASTRO"].HeaderText = "DT CADASTRO";
dgvConvenio.Columns["DT_ULT_ATUALIZACAO"].HeaderText = "ATUALIZAÇÃO EM";
dgvConvenio.Columns["STATUS"].HeaderText = "SITUAÇÃO";
dgvConvenio.Columns["CNPJ"].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
dgvConvenio.Columns["DT_CADASTRO"].DefaultCellStyle.Format = "dd/MM/yyyy";
dgvConvenio.Columns["DT_ULT_ATUALIZACAO"].DefaultCellStyle.Format = "dd/MM/yyyy";
dgvConvenio.Columns["CNPJ"].DefaultCellStyle.Format = "00.000.000/0000-00";
dgvConvenio.ScrollBars = ScrollBars.Both;
}
catch (Exception ex)
{
throw new Exception(ex.Message);
}
}