Click Event for TableRow?

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Click Event for TableRow?

    Is there any way to create a click event for a TableRow? It doesn't seem to
    be built in by default. If anyone knows how this can be implemented it would
    be most appreciated.

    Thanks,
    Steve


    Steve - DND Guest

  2. Similar Questions and Discussions

    1. CreateChildControls Event before Click Event
      Issue: I want to create a control that will accept a click event and then in response completely change it's look and feel. This could potentially...
    2. double click causes click-event anddoubleClick-event
      I too am interested in a response to this. I see all kinds of information on how to enable the double-click event, but not how to distinguish...
    3. stumped...table - row - click event, cancel checkbox event
      I have a html table and mutliple rows. On each row i put an onclick event that opesn a modal window and prompts the user for some information. I...
    4. Click Event Not Firing
      In Framework 1.1 (VS 2003, C#) I've written a server control that contains a button. If I place the control on a page surface, it renders fine and...
    5. Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl.
      Hello I have the following situation: (everything is dynamic (controls.add)) 1. Button.Init { WasButtonClickFired = true } 2....
  3. #2

    Default Re: Click Event for TableRow?

    "Steve - DND" <steve!@!digitalnothing.com> wrote in message news:<#EuyBrvVDHA.1280@tk2msftngp13.phx.gbl>...
    > Is there any way to create a click event for a TableRow? It doesn't seem to
    > be built in by default. If anyone knows how this can be implemented it would
    > be most appreciated.
    >
    > Thanks,
    > Steve
    You can write a client side click event for a table row using javascript.

    Thanks
    Ram
    Ram Guest

  4. #3

    Default Re: Click Event for TableRow?

    Check out this article, here i have created onclick event for tablerow.
    [url]http://www.microsoft.com/india/msdn/articles/Master%20Detail%20DataGrid.aspx[/url]
    or
    [url]http://www.extremeexperts.com/Net/Articles/default.aspx[/url]
    --
    Saravana
    Microsoft India Community Star,MC**
    [url]www.ExtremeExperts.com[/url]



    "Steve - DND" <steve!@!digitalnothing.com> wrote in message
    news:#EuyBrvVDHA.1280@tk2msftngp13.phx.gbl...
    > Is there any way to create a click event for a TableRow? It doesn't seem
    to
    > be built in by default. If anyone knows how this can be implemented it
    would
    > be most appreciated.
    >
    > Thanks,
    > Steve
    >
    >

    Saravana Guest

  5. #4

    Default Re: Click Event for TableRow?

    Thanks Natty, that did the trick.

    "Natty Gur" <natty@dao2com.com> wrote in message
    news:OB1fH5xVDHA.1560@TK2MSFTNGP11.phx.gbl...
    > Hi,
    >
    > yes, but you need to do it yourself.
    >
    > 1) Add client side javascript that will catch table clicks and check
    > using event.source if the type of the source element is TD. Then use
    > __DoPostBack('MyTRClickEvent','AnyParameter'). To indicate the server
    > side that your event needs to be raise.
    >
    > 2) Declare event in your page code behind. This event will occur on the
    > server side.
    > public event EventHandler TRClick;
    >
    >
    > 3) In the Page_Init check if the value in the __EVENTTARGET field is
    > 'MyTRClickEvent'. If so raise the event
    >
    > if (this.Request.Form["__EVENTTARGET"] == "devnetmenu")
    > {
    > if (MenuClick != null) // check if event hanler declared
    > MenuClick(this,oEvent);
    > }
    >
    > 4) write your code in the event handler

    Steve - DND Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

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 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139