Quantcast
Channel: C#nedir?com Forum
Viewing all articles
Browse latest Browse all 613

C# : DataGrid üzerindeki checkbox kontrolü

$
0
0
Author: KintaRo
Subject: DataGrid üzerindeki checkbox kontrolü
Posted: 28 Şubat 2017 at 17:43

sanırım şu işinizi görecektir:

        bool secim = true;
        private void button1_Click(object sender, EventArgs e)
        {

            foreach (DataGridViewRow row in dataGridView1.Rows)
            {
                DataGridViewCheckBoxCell chk = (DataGridViewCheckBoxCell)row.Cells[0];
                if (secim)
                {
                    chk.Value = true;
                }
                else
                {
                    chk.Value = false;
                }
            }

            if (secim) secim = false;
            else secim = true;
        }

Viewing all articles
Browse latest Browse all 613

Trending Articles