Strange event behavior with check boxes

  • Thread starter Thread starter Froefel
  • Start date Start date
F

Froefel

I've designed a gridview that contains a template field with an
unbound checkbox, allowing the user to select certain rows for further
action.

I am capturing the CheckedChanged event in order to set the grid's
SelectedIndex equal to the row whose check box was checked or
unchecked. However, for some strange reason when I click a checkbox
the CheckedChanged event fires for every checked checkbox in the grid,
from top to bottom. Consequently, the SelectedIndex always ends up
being the last checked row.

Can anyone shed some light on this behavior?

-- Hans
 
I've designed a gridview that contains a template field with an
unbound checkbox, allowing the user to select certain rows for further
action.

I am capturing the CheckedChanged event in order to set the grid's
SelectedIndex equal to the row whose check box was checked or
unchecked. However, for some strange reason when I click a checkbox
the CheckedChanged event fires for every checked checkbox in the grid,
from top to bottom. Consequently, the SelectedIndex always ends up
being the last checked row.

Can anyone shed some light on this behavior?

-- Hans

Hi...

can you please provide some code sample...

Masudur
 
Back
Top