468,247 Members | 1,453 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,247 developers. It's quick & easy.

Respond to DropDownList control Event in DataGrid

Ali
I am adding a DropDownList control to my DataGrid footer template. I load
my DropDownList using a function that returns an arrayList. I can see all
my items in the DropDownList, but when I select an item from the list, I am
unable to trap the DropDownList SelectedIndexChanged event.

This is a snippet of my DataGrid:

<asp:TemplateColumn>
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "State") %>
</ItemTemplate>
<FooterTemplate>
<asp:DropDownList id="dropDownListState"
DataSource="<%#Load_DropDownListState%>"
OnSelectedIndexChanged="dropDownListStateHandler" AutoPostBack="True" />
</FooterTempalte>
</asp:TemplateColumn>

NOTE: Even the DataGrid ItemCommand event does not fire up when I change the
index on my DropDownList control. I was hopping I can do something like
finding the control inside the ItemCommand Handler " dropDownListState =
myDataGrid.FindControl("dropDownListState").

Please help.

Ali
Nov 18 '05 #1
2 1768
I noticed your post went unanswered. Have you resolved this issue?

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"Ali" <el********@hotmail.com> wrote in message
news:uN**************@TK2MSFTNGP10.phx.gbl...
I am adding a DropDownList control to my DataGrid footer template. I load
my DropDownList using a function that returns an arrayList. I can see all
my items in the DropDownList, but when I select an item from the list, I am unable to trap the DropDownList SelectedIndexChanged event.

This is a snippet of my DataGrid:

<asp:TemplateColumn>
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "State") %>
</ItemTemplate>
<FooterTemplate>
<asp:DropDownList id="dropDownListState"
DataSource="<%#Load_DropDownListState%>"
OnSelectedIndexChanged="dropDownListStateHandler" AutoPostBack="True" />
</FooterTempalte>
</asp:TemplateColumn>

NOTE: Even the DataGrid ItemCommand event does not fire up when I change the index on my DropDownList control. I was hopping I can do something like
finding the control inside the ItemCommand Handler " dropDownListState =
myDataGrid.FindControl("dropDownListState").

Please help.

Ali

Nov 18 '05 #2
Ali
No, I have not. I decided to pull the dropDownList control from the footer
template. I am using the DropDownList is used for filtering.

Thanks
Ali
"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
news:Ok**************@TK2MSFTNGP10.phx.gbl...
I noticed your post went unanswered. Have you resolved this issue?

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"Ali" <el********@hotmail.com> wrote in message
news:uN**************@TK2MSFTNGP10.phx.gbl...
I am adding a DropDownList control to my DataGrid footer template. I load my DropDownList using a function that returns an arrayList. I can see all my items in the DropDownList, but when I select an item from the list, I

am
unable to trap the DropDownList SelectedIndexChanged event.

This is a snippet of my DataGrid:

<asp:TemplateColumn>
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "State") %>
</ItemTemplate>
<FooterTemplate>
<asp:DropDownList id="dropDownListState"
DataSource="<%#Load_DropDownListState%>"
OnSelectedIndexChanged="dropDownListStateHandler" AutoPostBack="True" />
</FooterTempalte>
</asp:TemplateColumn>

NOTE: Even the DataGrid ItemCommand event does not fire up when I change

the
index on my DropDownList control. I was hopping I can do something like
finding the control inside the ItemCommand Handler " dropDownListState =
myDataGrid.FindControl("dropDownListState").

Please help.

Ali


Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by NPC403 | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.