DoubleClick Event on ListBox

Discussion in 'ASP .Net Building Controls' started by kgray@tecolote.com, Mar 18, 2005.

  1. Guest

    I have created a user control that has a list box webcontrol.
    Unfortunately, The listbox control does not have the doubleclick event
    in it, and for the life of me, I can not seem to create one. Does
    anyone have any tips on how to do this? The user control is this list
    box, that is populated when the user control is loaded into my web page.
     
    , Mar 18, 2005
    #1
    1. Advertising

  2. Guest

    the <select control supports a client-side javascript event called
    ondblclick

    so you could simply create a dummy control such as a hidden button
    and then using
    String APostBackReferenceforsomecontrolorevent =
    GetPostBackClientEvent(btnOnListBoxDblClick, "");

    myListBox.Attributes.Add("ondblclick",
    APostBackReferenceforsomecontrolorevent);

    There are other ways of handling this and depending upon your situation
    you may wish to customize it but this is a very basic example that
    hopefully will get youstarted.
     
    , Mar 21, 2005
    #2
    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. Mike

    DoubleClick on ListBox

    Mike, May 6, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    4,763
    =?Utf-8?B?S2FzaHlwYQ==?=
    May 6, 2004
  2. David Lozzi

    Firing a function on a doubleclick event

    David Lozzi, Mar 9, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    5,655
    =?Utf-8?B?VGltIFN0YWxs?=
    Mar 9, 2005
  3. Buddy Ackerman

    No Doubleclick event on a Listbox control?

    Buddy Ackerman, May 19, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    2,146
    Brock Allen
    May 19, 2005
  4. =?Utf-8?B?cGVsZWdrMQ==?=

    asp.net 2 : asp:listbox doubleclick and fire event

    =?Utf-8?B?cGVsZWdrMQ==?=, Aug 31, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    848
    bruce barker
    Sep 1, 2007
  5. OfurGørn

    ListBox Click or DoubleClick event for web apps

    OfurGørn, Jul 29, 2005, in forum: ASP .Net Web Controls
    Replies:
    4
    Views:
    437
    OfurGørn
    Jul 29, 2005
Loading...

Share This Page