3 August 2016

Fill Controls by Double click Cell in datagridview in C#

private void DGV_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            C1.Text = DGV["lno", e.RowIndex].Value.ToString();
            DT.Value = Convert.ToDateTime(DGV["date1", e.RowIndex].Value);
            C2.Text = DGV["pcode", e.RowIndex].Value.ToString();
            textBox11.Text = DGV["tcode", e.RowIndex].Value.ToString();
            C3.Text = DGV["pname", e.RowIndex].Value.ToString();
            C4.Text = DGV["sname", e.RowIndex].Value.ToString();
            C5.Text = DGV["type1", e.RowIndex].Value.ToString();
            C6.Text = DGV["type2", e.RowIndex].Value.ToString();
            textBox1.Text = DGV["qty", e.RowIndex].Value.ToString();
            textBox2.Text = DGV["gram", e.RowIndex].Value.ToString();
        }


Write to murugankarthik@gmail.com for more.

No comments:

Post a Comment