DataGridViewCheckBox

  • Thread starter Thread starter Ratnakar Pedagani
  • Start date Start date
R

Ratnakar Pedagani

Hi,

I have a datagridview in which i have a DataGridViewCheckBoxColumn. I
want to know which event should i use so that whenever i check the
checkbox, it should immediately notify me saying that this particular
row, this checkbox has been checked. I tried cellvalueChanged event,
but it fires only once it loses the focus from that row. Any
suggestions or help is highly appreciated.

Thanks,
Ratnakar.
 
i use the CellContentClick event and then look at the e.ColumnIndex
after checking that the e.RowIndex is > -1

here is the start of code to look at it:

If (e.RowIndex > -1) Then

Select Case e.ColumnIndex

Case Enums.FaxGrid.Ignore

ignoreBefore =
CType(faxGrid.CurrentRow.Cells(Enums.FaxGrid.Ignore).Value.ToString,
Boolean)

faxGrid.EndEdit()

ignoreAfter =
CType(faxGrid.CurrentRow.Cells(Enums.FaxGrid.Ignore).Value.ToString,
Boolean)

If ignoreAfter <> ignoreBefore Then
 
i use the CellContentClick event and then look at the e.ColumnIndex
after checking that the e.RowIndex is > -1

here is the start of code to look at it:

If (e.RowIndex > -1) Then

Select Case e.ColumnIndex

Case Enums.FaxGrid.Ignore

ignoreBefore =
CType(faxGrid.CurrentRow.Cells(Enums.FaxGrid.Ignore).Value.ToString,
Boolean)

faxGrid.EndEdit()

ignoreAfter =
CType(faxGrid.CurrentRow.Cells(Enums.FaxGrid.Ignore).Value.ToString,
Boolean)

If ignoreAfter <> ignoreBefore Then







- Show quoted text -

Jay,

Thanks a lot, it Works !!!!
 
Back
Top