Datalist- Panel for each item? Possible?

F

footballhead

I have a datalist on a page and I'd like to inlcude a panel that I can
show or hide for each item in the list. Actually, I only want to show 1
panel at a time. Is this possible?

I was thinking that to do this I would use a panel in the template. But
in order to control the panels, they would each have to own unique ID
assigned. How do I assign each panel a unique ID?

Thanks for any help!

Rick D.
 
G

Guest

Hi there,

You can use

Panel panel = DataList.Items[row_index].FindControl("panel_ID") as Panel;

to refer individual panel in each ‘row’ of datalist. Hence, you don't need
assign unique ID for each panel.

HTH

Elton Wang
 

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,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top