ListBox Click or DoubleClick event for web apps

Discussion in 'ASP .Net Web Controls' started by OfurGørn, Jul 29, 2005.

  1. OfurGørn

    OfurGørn Guest

    Hi

    I am trying to make a listbox in a c# web application that updates some data
    on the page when an item in the list is clicked. This is easy on a
    traditional listbox (in a form application) - using the Click event, but the
    Click or DoubleClick event is missing on the web version of the ListBox.

    I suspect there is a very simple solution to this problem, but I am not
    seeing it.....

    I am pretty sure someone out there has encountered this before, and has an
    accepatble solution.

    Looking forward to hearing something

    ________________________
    Gunnar Gudmundsson
     
    OfurGørn, Jul 29, 2005
    #1
    1. Advertising

  2. OfurGørn

    Patrice Guest

    First keep in mind that it would mean that you postback the form each time
    you click in the list. This is not the usual behavior in particular in a web
    UI.

    Generally this would rather be done client side to avoid a server round trip
    each time you do something on the form.

    --
    Patrice

    "OfurGørn" <> a écrit dans le message de
    news:...
    > Hi
    >
    > I am trying to make a listbox in a c# web application that updates some

    data
    > on the page when an item in the list is clicked. This is easy on a
    > traditional listbox (in a form application) - using the Click event, but

    the
    > Click or DoubleClick event is missing on the web version of the ListBox.
    >
    > I suspect there is a very simple solution to this problem, but I am not
    > seeing it.....
    >
    > I am pretty sure someone out there has encountered this before, and has an
    > accepatble solution.
    >
    > Looking forward to hearing something
    >
    > ________________________
    > Gunnar Gudmundsson
     
    Patrice, Jul 29, 2005
    #2
    1. Advertising

  3. OfurGørn

    OfurGørn Guest

    Hi Patrice.
    I am aware of that, as the data to be diplayed is on the server.
    ________________________
    Gunnar Gudmundsson


    "Patrice" wrote:

    > First keep in mind that it would mean that you postback the form each time
    > you click in the list. This is not the usual behavior in particular in a web
    > UI.
    >
    > Generally this would rather be done client side to avoid a server round trip
    > each time you do something on the form.
    >
    > --
    > Patrice
    >
    > "OfurGørn" <> a écrit dans le message de
    > news:...
    > > Hi
    > >
    > > I am trying to make a listbox in a c# web application that updates some

    > data
    > > on the page when an item in the list is clicked. This is easy on a
    > > traditional listbox (in a form application) - using the Click event, but

    > the
    > > Click or DoubleClick event is missing on the web version of the ListBox.
    > >
    > > I suspect there is a very simple solution to this problem, but I am not
    > > seeing it.....
    > >
    > > I am pretty sure someone out there has encountered this before, and has an
    > > accepatble solution.
    > >
    > > Looking forward to hearing something
    > > ________________________
    > > Gunnar Gudmundsson
     
    OfurGørn, Jul 29, 2005
    #3
  4. OfurGørn

    Patrice Guest

    Ok just wanted to make sure before.

    You can just the SelectedIndexChanged event. You have just to set the
    Autopostback property to true so that selecting another value will submit
    the form allowing to handle the event immediately server side.

    --
    Patrice

    "OfurGørn" <> a écrit dans le message de
    news:...
    > Hi Patrice.
    > I am aware of that, as the data to be diplayed is on the server.
    > ________________________
    > Gunnar Gudmundsson
    >
    >
    > "Patrice" wrote:
    >
    > > First keep in mind that it would mean that you postback the form each

    time
    > > you click in the list. This is not the usual behavior in particular in a

    web
    > > UI.
    > >
    > > Generally this would rather be done client side to avoid a server round

    trip
    > > each time you do something on the form.
    > >
    > > --
    > > Patrice
    > >
    > > "OfurGørn" <> a écrit dans le message de
    > > news:...
    > > > Hi
    > > >
    > > > I am trying to make a listbox in a c# web application that updates

    some
    > > data
    > > > on the page when an item in the list is clicked. This is easy on a
    > > > traditional listbox (in a form application) - using the Click event,

    but
    > > the
    > > > Click or DoubleClick event is missing on the web version of the

    ListBox.
    > > >
    > > > I suspect there is a very simple solution to this problem, but I am

    not
    > > > seeing it.....
    > > >
    > > > I am pretty sure someone out there has encountered this before, and

    has an
    > > > accepatble solution.
    > > >
    > > > Looking forward to hearing something
    > > > ________________________
    > > > Gunnar Gudmundsson
     
    Patrice, Jul 29, 2005
    #4
  5. OfurGørn

    OfurGørn Guest

    thanks Patrice. Works like a charm.

    This is the simple solution I was overlooking... Irritating how the simple
    ones are often hard !

    ________________________
    Gunnar Gudmundsson


    "Patrice" wrote:

    > Ok just wanted to make sure before.
    >
    > You can just the SelectedIndexChanged event. You have just to set the
    > Autopostback property to true so that selecting another value will submit
    > the form allowing to handle the event immediately server side.
    >
    > --
    > Patrice
    >
    > "OfurGørn" <> a écrit dans le message de
    > news:...
    > > Hi Patrice.
    > > I am aware of that, as the data to be diplayed is on the server.
    > > ________________________
    > > Gunnar Gudmundsson
    > >
    > >
    > > "Patrice" wrote:
    > >
    > > > First keep in mind that it would mean that you postback the form each

    > time
    > > > you click in the list. This is not the usual behavior in particular in a

    > web
    > > > UI.
    > > >
    > > > Generally this would rather be done client side to avoid a server round

    > trip
    > > > each time you do something on the form.
    > > >
    > > > --
    > > > Patrice
    > > >
    > > > "OfurGørn" <> a écrit dans le message de
    > > > news:...
    > > > > Hi
    > > > >
    > > > > I am trying to make a listbox in a c# web application that updates

    > some
    > > > data
    > > > > on the page when an item in the list is clicked. This is easy on a
    > > > > traditional listbox (in a form application) - using the Click event,

    > but
    > > > the
    > > > > Click or DoubleClick event is missing on the web version of the

    > ListBox.
    > > > >
    > > > > I suspect there is a very simple solution to this problem, but I am

    > not
    > > > > seeing it.....
    > > > >
    > > > > I am pretty sure someone out there has encountered this before, and

    > has an
    > > > > accepatble solution.
    > > > >
    > > > > Looking forward to hearing something
    > > > > ________________________
    > > > > Gunnar Gudmundsson

    >
    >
    >
     
    OfurGørn, Jul 29, 2005
    #5
    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,770
    =?Utf-8?B?S2FzaHlwYQ==?=
    May 6, 2004
  2. Buddy Ackerman

    No Doubleclick event on a Listbox control?

    Buddy Ackerman, May 19, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    2,149
    Brock Allen
    May 19, 2005
  3. =?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
  4. DoubleClick Event on ListBox

    , Mar 18, 2005, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    191
  5. Dennis Fricker

    doubleclick row vs. ButtonColumns' click event

    Dennis Fricker, Oct 20, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    127
    Dennis Fricker
    Oct 20, 2004
Loading...

Share This Page