Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. how do I simulate a click event

how do I simulate a click event

Scheduled Pinned Locked Moved ASP.NET
questionhelp
3 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dove11
    wrote on last edited by
    #1

    I'm trying to simulate the click event for a linkbutton in a template column on a datagrid. This is a web form. I cannot get the DataGrid's onitemcommand event to fire. I tried bubbling events and couldn't get it to work (see posting dated 5/22/2006 16:33). Is there another way, through a timer or some other method that I can get this to work? I have a client who wants this feature and is ready to pull some work out if we can't get it to work. Thanks for your help.

    M 1 Reply Last reply
    0
    • D dove11

      I'm trying to simulate the click event for a linkbutton in a template column on a datagrid. This is a web form. I cannot get the DataGrid's onitemcommand event to fire. I tried bubbling events and couldn't get it to work (see posting dated 5/22/2006 16:33). Is there another way, through a timer or some other method that I can get this to work? I have a client who wants this feature and is ready to pull some work out if we can't get it to work. Thanks for your help.

      M Offline
      M Offline
      Mihai Drebot
      wrote on last edited by
      #2

      you can add the linkbutton in the template column, set it's onclick attribute, create the event handler, it will trigger just fine. you might have a bit of trouble trying to sort out on what row the linkbutton that fired the event was, you can find that out using the ParentControl property of the linkbutton i'll try to find a code snipet in some of my projects and post it for you

      D 1 Reply Last reply
      0
      • M Mihai Drebot

        you can add the linkbutton in the template column, set it's onclick attribute, create the event handler, it will trigger just fine. you might have a bit of trouble trying to sort out on what row the linkbutton that fired the event was, you can find that out using the ParentControl property of the linkbutton i'll try to find a code snipet in some of my projects and post it for you

        D Offline
        D Offline
        dove11
        wrote on last edited by
        #3

        Thank you for responding. I have done all that you suggested before I wrote this. See posting dated 5/22/2006 16:33, subject bubbling events. The linkbutton is added to a template column on a DataGrid. I'm not sure however what you mean by setting it's onclick attribute. It's commandname = "view" and the DataGrid onitemcommand = "ViewRecipientSubDetail". I want to branch to the DataGrid's onitemcommand event, which is the event handler. I have determined the row that contains the linkbutton that fired the event. It still isn't firing.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups