Exemplo n.º 1
0
        private void grdKasaDetay_DataBindingComplete(object sender, System.Windows.Forms.DataGridViewBindingCompleteEventArgs e)
        {
            if (grdKasaDetay.Rows.Count > 0)
            {
                grdKasaDetay.Rows[0].Selected = false;

                DataTable dataTable = grdKasaDetay.DataSource as DataTable;
                for (int i = 0; i < dataTable.Rows.Count; i++)
                {
                    if (dataTable.Rows[i][dataTable.Columns["GIRIS_CIKIS"]].ToString() == "G")
                    {
                        grdKasaDetay.Rows[i].Cells["grdTUTAR"].Style.ForeColor = Color.Green;
                        grdKasaDetay.Rows[i].Cells["grdTUTAR"].Style.Font      = new Font("Arial", 12, FontStyle.Bold);
                    }
                    else if (dataTable.Rows[i][dataTable.Columns["GIRIS_CIKIS"]].ToString() == "C")
                    {
                        grdKasaDetay.Rows[i].Cells["grdTUTAR"].Style.ForeColor = Color.Red;
                        grdKasaDetay.Rows[i].Cells["grdTUTAR"].Style.Font      = new Font("Arial", 12, FontStyle.Bold);
                    }
                }
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Evento de binding concluído do datagridview
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void dgv_endereços_DataBindingComplete(object sender, System.Windows.Forms.DataGridViewBindingCompleteEventArgs e)
 {
     lbl_num_registros.Text = $@"Total de registros:{dgv_endereços.Rows.Count}";
 }
Exemplo n.º 3
0
 private void Gv_student_DataBindingComplete(object sender, System.Windows.Forms.DataGridViewBindingCompleteEventArgs e)
 {
     this.gv_student.ClearSelection();
 }