Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > AddHandler statement

Reply
Thread Tools

AddHandler statement

 
 
bbernieb
Guest
Posts: n/a
 
      06-15-2005
I created a DataGrid dynamically using a PlaceHolder; to sort the DataGrid I
used the AddHandler statement ( AddHandler myDataGrid.SortCommand, AddressOf
myEventHandler). It didn't work. The code never reached "myEventHandler"
So, I tried using the AddHandler statement on a DataGrid that wasn't created
dynamically. It did work. What could I be missing?


 
Reply With Quote
 
 
 
 
Sonu Kapoor
Guest
Posts: n/a
 
      06-16-2005
You need to add the handler in the Init. Where are you adding it?

--
Sonu Kapoor - [MCP]
ASP.NET Moderator
WebSite: http://www.Kapoorsolutions.com
Blog: http://www.Kapoorsolutions.com/blog/
ASP.NET News: http://www.Kapoorsolutions.com/reblogger/


"bbernieb" wrote:

> I created a DataGrid dynamically using a PlaceHolder; to sort the DataGrid I
> used the AddHandler statement ( AddHandler myDataGrid.SortCommand, AddressOf
> myEventHandler). It didn't work. The code never reached "myEventHandler"
> So, I tried using the AddHandler statement on a DataGrid that wasn't created
> dynamically. It did work. What could I be missing?
>
>
>

 
Reply With Quote
 
 
 
 
bbernieb
Guest
Posts: n/a
 
      06-22-2005
Thanks!! It works.
"Sonu Kapoor" <> wrote in message
news:EDC6A80E-7443-440D-86D1-...
> You need to add the handler in the Init. Where are you adding it?
>
> --
> Sonu Kapoor - [MCP]
> ASP.NET Moderator
> WebSite: http://www.Kapoorsolutions.com
> Blog: http://www.Kapoorsolutions.com/blog/
> ASP.NET News: http://www.Kapoorsolutions.com/reblogger/
>
>
> "bbernieb" wrote:
>
> > I created a DataGrid dynamically using a PlaceHolder; to sort the

DataGrid I
> > used the AddHandler statement ( AddHandler myDataGrid.SortCommand,

AddressOf
> > myEventHandler). It didn't work. The code never reached

"myEventHandler"
> > So, I tried using the AddHandler statement on a DataGrid that wasn't

created
> > dynamically. It did work. What could I be missing?
> >
> >
> >



 
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
ImageButton addhandler not firing ! Tee ASP .Net 1 02-18-2004 04:00 PM
AddHandler question Craig Buchanan ASP .Net 3 02-12-2004 06:00 PM
Event AddHandler Kay ASP .Net 2 02-03-2004 07:02 PM
Re: Help w/AddHandler (Not Firing Off) Natty Gur ASP .Net 1 08-11-2003 03:06 PM
Help w/AddHandler (Not Firing Off) Jeffrey A. Voigt ASP .Net 3 08-11-2003 04:53 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57