Re: Data List Newbie Question

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Bishop (kwayne_at_new.rr.com)
Date: 04/21/04


Date: Wed, 21 Apr 2004 20:36:39 GMT

Thanks, Turns out it was a problem with the way I had the command button
defined in the alternate item template.

"Doug" <googleposter2003@hotmail.com> wrote in message
news:a2e227de.0404211111.5fae7128@posting.google.com...
> You've got the button in the ItemTemplate section of the DataList,
> right?
> So when you click the first instance of the button,
> e.Item.ItemIndex=0, the next button should return 1, then 2 etc. Ain't
> gonna work if it's anywhere else, believe me I've tried ;-)
>
>
> "Bishop" <kwayne@new.rr.com> wrote in message
news:<l1whc.2888$kk7.32@twister.rdc-kc.rr.com>...
> > I have a DataList with a command button. When I click the command
button it
> > runs the following sub routine:
> >
> > Sub DataList_ItemCommand(ByVal s As Object, ByVal e As
> > DataListCommandEventArgs)
> >
> > If (e.CommandName = "Details") Then
> >
> > txtTest.Text = e.Item.ItemIndex
> >
> > End If
> >
> > End Sub
> >
> > The problem I have is that e.Item.ItemIndex always returns a "0". Any
ideas
> > why?


Quantcast