Professional Web Applications Themes

Click Event for TableRow? - ASP.NET General

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...

  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. #2

    Default Re: Click Event for TableRow?

    "Steve - DND" <steve!!digitalnothing.com> wrote in message news:<#EuyBrvVDHA.1280tk2msftngp13.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

  3. #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.1280tk2msftngp13.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

  4. #4

    Default Re: Click Event for TableRow?

    Thanks Natty, that did the trick.

    "Natty Gur" <nattydao2com.com> wrote in message
    news:OB1fH5xVDHA.1560TK2MSFTNGP11.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

Similar Threads

  1. CreateChildControls Event before Click Event
    By Mark Sisson in forum ASP.NET Building Controls
    Replies: 2
    Last Post: September 30th, 02:41 PM
  2. double click causes click-event anddoubleClick-event
    By jpsouthern in forum Macromedia Flex General Discussion
    Replies: 1
    Last Post: April 14th, 09:27 PM
  3. stumped...table - row - click event, cancel checkbox event
    By dave in forum ASP.NET Building Controls
    Replies: 0
    Last Post: September 2nd, 01:28 AM
  4. Click Event Not Firing
    By Hardin Brothers in forum ASP.NET Building Controls
    Replies: 2
    Last Post: February 10th, 04:10 PM
  5. Replies: 2
    Last Post: May 28th, 06:23 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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