468,505 Members | 1,714 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Accessing a control in the EditItemTemplate

I am trying to access a control in the EditItemTemplate of a DataList in a
usercontrol of mine. In the ItemDataBound event I can simply use

CType(e.Item.FindControl("ddlEditSection"), DropDownList)

But the place that I am trying to access it from right now is not an event
of the DataList, so it does not have e as one of the parameters. What do I
do? Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/
Jun 21 '07 #1
1 1163

Nathan Sokalski wrote:
I am trying to access a control in the EditItemTemplate of a DataList in a
usercontrol of mine. In the ItemDataBound event I can simply use

CType(e.Item.FindControl("ddlEditSection"), DropDownList)

But the place that I am trying to access it from right now is not an event
of the DataList, so it does not have e as one of the parameters. What do I
do? Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/
e.Item is a row of DataGrid. You can access certain row through Items
collection.
e.g. in C#:
int rowIndex = DataGrid1.EditItemIndex;
DataGrid1.Items[rowIndex].FindControl(..

Regards, Mykola
http://marss.co.ua

Jun 21 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Jeff User | last post: by
reply views Thread by Mike | last post: by
reply views Thread by RAM | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.