Strange event behavior with check boxes

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
 
M

Masudur

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top