still trying to figure out datalist event handler

G

Guest

hey all,
i was just wondering when does the DataList_SelectedIndexChanged ever occur.
I've only used it as a container for other controls such as a link button.

thanks,
rodchar
 
F

Flinky Wisty Pomm

I would hazard a guess that the SelectedIndexChanged event occurs when
the selected index changes.

If the datalist works like other controls, this will occur (without any
extra work from you) when a child control raises the Command event with
a command name of "select".

So <asp:LinkButton id=".." runat="server" CommandName="Select"
Text="Might select a given DataListItem" />

Note: I haven't tested that, but the GridView handles ItemCommand
events with command names of "select", "insert", "update", and "delete"
automatically and fires the appropriate GridView events.
 

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
474,434
Messages
2,571,688
Members
48,796
Latest member
Greg L.

Latest Threads

Top