nested repeaters with javascript for checkbox toggling

M

Machi

let say i created nested repeaters in HTML page of a particular Web Form. Parent repeater dubbed :

"parentRepeater", child Repeater dubbed "childRepeater" . Within "parentRepeater" and "childRepeater", i

defined a checkbox respectively. In Code-Behind, i will dynamically generate parent-child records, as such ..

[parentRepeater1
[childRepeater1-1
[childRepeater1-2

[parentRepeater2
[childRepeater2-1

[parentRepeater3
[childRepeater3-1
[childRepeater3-2
[childRepeater3-3

When user clicks on the [parentRepeater1], all its child records (refer to above : 2 records) checkboxes will

be checked ... when user uncheck the checkboxes, all it's child checkboxes will be uncheck .. When user check
[childRepeater1-1] and [childRepeater1-2], its parent ([parentRepeater1]) will be checked too. What i want is,

output the javascript for toggling from code-behind to html page, so that check and uncheck of checkboxes will

handled on client side . How can i achieve
 
R

Ray at

You'll want to ask in asp.net group. m.p.dotnet.framework.aspnet for
example.

Ray at home

Machi said:
let say i created nested repeaters in HTML page of a particular Web Form. Parent repeater dubbed :

"parentRepeater", child Repeater dubbed "childRepeater" . Within
"parentRepeater" and "childRepeater", i
defined a checkbox respectively. In Code-Behind, i will dynamically
generate parent-child records, as such ...
[parentRepeater1]
[childRepeater1-1]
[childRepeater1-2]

[parentRepeater2]
[childRepeater2-1]

[parentRepeater3]
[childRepeater3-1]
[childRepeater3-2]
[childRepeater3-3]

When user clicks on the [parentRepeater1], all its child records (refer to
above : 2 records) checkboxes will
be checked ... when user uncheck the checkboxes, all it's child checkboxes
will be uncheck .. When user checks
[childRepeater1-1] and [childRepeater1-2], its parent ([parentRepeater1])
will be checked too. What i want is,
output the javascript for toggling from code-behind to html page, so that
check and uncheck of checkboxes will
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top