AddHandler statement

Discussion in 'ASP .Net Datagrid Control' started by bbernieb, Jun 15, 2005.

  1. bbernieb

    bbernieb Guest

    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?
     
    bbernieb, Jun 15, 2005
    #1
    1. Advertising

  2. bbernieb

    Sonu Kapoor Guest

    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?
    >
    >
    >
     
    Sonu Kapoor, Jun 16, 2005
    #2
    1. Advertising

  3. bbernieb

    bbernieb Guest

    Thanks!! It works.
    "Sonu Kapoor" <> wrote in message
    news:...
    > 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?
    > >
    > >
    > >
     
    bbernieb, Jun 22, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jeffrey A. Voigt

    Help w/AddHandler (Not Firing Off)

    Jeffrey A. Voigt, Aug 10, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    661
    Natty Gur
    Aug 11, 2003
  2. Natty Gur

    Re: Help w/AddHandler (Not Firing Off)

    Natty Gur, Aug 11, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    445
    Jeff Voigt
    Aug 11, 2003
  3. Kay

    Event AddHandler

    Kay, Feb 3, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    2,199
  4. Craig Buchanan

    AddHandler question

    Craig Buchanan, Feb 12, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    405
    Kevin Spencer
    Feb 12, 2004
  5. Tee
    Replies:
    1
    Views:
    3,323
    Martin Dechev
    Feb 18, 2004
Loading...

Share This Page