Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

Event to get check box value in DataGridView

$
0
0

Hi,

 

I’ve createdDataGridViewCheckBoxColumn named “Select”.

I clicked the checkbox & tried to get the check box value in event.

For example I tried inCellMouseUp event.

I didn’t get the checked values; instead I get the null values.

 

Privatevoid dataGridView1_CellMouseUp(object sender,DataGridViewCellMouseEventArgs e)

       {           

               if ((bool)gridViewRow.Cells["Select"].Value)

               {

                   if (!btnPrint.Enabled)

                       btnPrint.Enabled = true;

               }

               else

               {

                   if (btnPrint.Enabled)

                       btnPrint.Enabled = false;

               }           

       }

Which event I can get theDataGridViewCheckBoxColumn value after the click in check box?


Anandhan.S

Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>