Firing datagrid dropdownlist on selection change

T

Tro y

I have a datagrid with a template that has several dropdownlists when in edit mode. I need an event handler for the dropdownlist so on a new selection several other dropdownlists are updated with related data. I have written code to do just this on the itemCreated event of the datagrid, but need to execute this same code on a selection change in the dropdownlist. How do I do this in code behind? How do I reference the datagrid control and capture the event

Thank you

Troy
 
T

Teemu Keiski

Hi,

you can wire the event handler say in ItemCommand event handler (search the
control from Item and then just wire in code), or you can wire it
declaratively in aspx (...OnSelectedIndexChanged="method_name"...) for the
DDL (in the template).

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist


I have a datagrid with a template that has several dropdownlists when in
edit mode. I need an event handler for the dropdownlist so on a new
selection several other dropdownlists are updated with related data. I have
written code to do just this on the itemCreated event of the datagrid, but
need to execute this same code on a selection change in the dropdownlist.
How do I do this in code behind? How do I reference the datagrid control
and capture the event?

Thank you.

Troy
 

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,731
Messages
2,569,432
Members
44,835
Latest member
KetoRushACVBuy

Latest Threads

Top