Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > Getting control of Items within a Datalist

Reply
Thread Tools

Getting control of Items within a Datalist

 
 
ree32
Guest
Posts: n/a
 
      10-06-2004
I have a problem as I have placed a dropdownlist in a datalist.

Whenever the selected index changes I need to change a label inside
the datalist.

The problem is I can't get control of the label.

When dropdownlist changes it goes to a function with args of
systemEvent than a DataListItemEventArgs so I have no way getting
control of the item in the datalist to change the label.

Can someone please help me.
 
Reply With Quote
 
 
 
 
Michael Tkachev
Guest
Posts: n/a
 
      10-06-2004
Label l = (Label)DataList.Items[e.Item.ItemIndex].Controls[CotrolNumber];

"ree32" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> I have a problem as I have placed a dropdownlist in a datalist.
>
> Whenever the selected index changes I need to change a label inside
> the datalist.
>
> The problem is I can't get control of the label.
>
> When dropdownlist changes it goes to a function with args of
> systemEvent than a DataListItemEventArgs so I have no way getting
> control of the item in the datalist to change the label.
>
> Can someone please help me.



 
Reply With Quote
 
 
 
 
ree32
Guest
Posts: n/a
 
      10-06-2004
Thanks for your help but I was wondering where do I get the control
number?
Also the e.Item.Index how will it work outside the a datalist command
as the eventargs passed in aren't DataListItemEventArgs, but EventArgs
(since its responding to a change in the dropdownlist).

>>Re: Getting control of Items within a Datalist
>>From: Michael Tkachev
>>Date Posted: 10/6/2004 5:37:00 AM


>>Label l = (Label)DataList.Items[e.Item.ItemIndex].Controls[CotrolNumber];

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with DataList within DataList Will ASP .Net Web Controls 4 10-18-2007 03:19 AM
controls getting values from another control---within a control DC Gringo ASP .Net Building Controls 1 09-16-2004 07:59 AM
controls getting values from another control---within a control DC Gringo ASP .Net Web Controls 1 09-16-2004 07:59 AM
controls getting values from another control---within a control DC Gringo ASP .Net 0 09-15-2004 04:22 PM
Setting up a datalist control - Item_DataBound for a datalist in a datalist Nevyn Twyll ASP .Net 8 09-09-2004 10:13 PM



Advertisments