Re: link data grid edit button
- From: "Elton W" <EltonW@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 12 May 2005 05:50:04 -0700
itemIndex = -1 means ListItemType.Header.
So you have to use
If e.Item.ItemType = ListItemType.Item OrElse e.Item.ItemType =
ListItemType.Item = ListItemType.AlternatingItem Then
rather than
If e.Item.ItemType = ListItemType.Item OrElse ListItemType.AlternatingItem
Then
That condition will bypass Header, Footer, Separator, Pager items.
HTH
Elton
"John M" wrote:
> Ignore the last,
>
> I found it (itemIndex = -1, and that's why controls.count = 0),
> so I add in the code :
> If e.Item.ItemIndex <> -1 Then ...
>
> Another thing is that I see that the page is refreshing (page_load event
> occurs),
> but the command editBtn.Attributes.Add("Onclick", "Alert('Edit Message')")
> is not doing anything.
> (There is no message box).
> Why ?
>
> Thanks :)
>
>
>
.
- References:
- link data grid edit button
- From: John M
- link data grid edit button
- From: Elton W
- Re: link data grid edit button
- From: John M
- Re: link data grid edit button
- From: Elton W
- Re: link data grid edit button
- From: John M
- Re: link data grid edit button
- From: Elton W
- Re: link data grid edit button
- From: John M
- Re: link data grid edit button
- From: Elton W
- Re: link data grid edit button
- From: John M
- Re: link data grid edit button
- From: John M
- link data grid edit button
- Prev by Date: Use aspx.vb Code to Javascript Code
- Next by Date: Re: Downloading/opening file in client application window
- Previous by thread: Re: link data grid edit button
- Next by thread: Re: Help: Runtime Error - Server Error in '/' Application
- Index(es):