Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 21, 2006 12:12 PM by joteke
Jan 19, 2006 11:13 PM|LINK
Web controls like Repeater and GridView respond to the ItemCommand event, but only for "buttons" (Button, ImageButton and LinkButton).
I'm developing a custom control derived from DropDownList that implements IButtonControl. No problem with this, but the Repeater control does not acknowledge of the Command event raised in my control.
The question: how can I make that the Repeter control looks for a Command event in my custom control? It seems to check only for Button, ImageButton and LinkButton controls.
Thanks in advance,
Jan 21, 2006 12:12 PM|LINK
I responded to your question with a blog post
How to develop a command-capable DropDownList
But with a simpler approach, if you have a standard DropDownList on GridViewRow, you can get to the row in DropDownList's SelectedIndexChanged event via DropDownList's NamingContainer property. And when you get the row, you can get the row index and again
data key values etc and then do what you need and can do. That wouldn't require a custom control. For example:
Anyways, hope this helps