load selected records (CheckBox) inside DataGridView a report viewer

0

with this button I am verifying the selected records (Checkbox) within my 'dataGridViewCodigo' and it works normally the question is how to upload it to my report viewer.

private void buttonVisualizar_Click(object sender, EventArgs e)
{
    foreach (DataGridViewRow row in dataGridViewCodigo.Rows)
    {
        if (Convert.ToBoolean(row.Cells["Estado"].Value) == true)
        {
            var Codigo = $@"{row.Cells["codPersona"].Value}";
            var Nombre = $@"{row.Cells["NombreCompleto"].Value}";

            MessageBox.Show(Codigo, Nombre);
        }
    }
}

This method try

adapter.Fill(DataSetSigaSMS, "DTCodigo");

dataGridViewCodigo.DataSource = DataSetSigaSMS;
dataGridViewCodigo.DataMember = "DTCodigo";
dataGridViewCodigo.Refresh();
    
asked by 01.02.2018 в 21:29
source

0 answers