Saturday, March 24, 2012

Strange event behavior with check boxes

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?
-- HansOn Jul 26, 9:23 pm, Froefel <hansdeschry...@.gmail.com> wrote:
> 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

0 comments:

Post a Comment