Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > DataGrid OnItemBound find control

Reply
Thread Tools

DataGrid OnItemBound find control

 
 
trinitypete
Guest
Posts: n/a
 
      08-01-2003
Fixed it, the first item received in the onItemBound event
is the datagrid header, this doesn't contain the button. I
just have to ensure that I only check the body.

Pete.
>-----Original Message-----
>Hi all,
>
>I have datagrid with a template column on it. This
>template column contains a link button with an ID of
>DeleteLink and it is server side. In the Datagrid
>OnItemBound I try to locate the link button so i can add
>client side script.
>
>i.e. ((LinkButton) e.Item.FindControl
>("DeleteLink")).Attributes.Add("onclick","DoSomet hing()")
>
>I always get object reference not set or similar - Its

not
>finding the button with an ID of DeleteLink. If I let the
>page render in the browser and look at the source the ID
>of the link button has been renamed (prefixed with Cell
>Name etc) Am I missing something here?
>
>Pete.
>.
>

 
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
How to exclude action of Find::Find::find in subdirectories withknown names? vdvorkin Perl Misc 3 02-14-2011 05:28 AM
How to exclude action of Find::Find::find in subdirectories withknown names? vdvorkin Perl Misc 0 02-10-2011 05:18 PM
cannot use DataRowView in ONItemBound event if datagrid datasource is Datareader? rockdale.green@gmail.com ASP .Net Web Controls 0 06-07-2006 08:50 PM
cannot use DataRowView in ONItemBound event if datagrid datasource is Datareader? rockdale ASP .Net 0 06-07-2006 05:35 PM
Find.find does not find orphaned links? Wybo Dekker Ruby 1 11-15-2005 02:50 PM



Advertisments