Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > ListBox Click or DoubleClick event for web apps

Reply
Thread Tools

ListBox Click or DoubleClick event for web apps

 
 
OfurGørn
Guest
Posts: n/a
 
      07-29-2005
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
 
Reply With Quote
 
 
 
 
Patrice
Guest
Posts: n/a
 
      07-29-2005
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

"OfurGrn" <(E-Mail Removed)> a crit dans le message de
news:(E-Mail Removed)...
> 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



 
Reply With Quote
 
 
 
 
OfurGørn
Guest
Posts: n/a
 
      07-29-2005
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" <(E-Mail Removed)> a écrit dans le message de
> news:(E-Mail Removed)...
> > 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

 
Reply With Quote
 
Patrice
Guest
Posts: n/a
 
      07-29-2005
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

"OfurGrn" <(E-Mail Removed)> a crit dans le message de
news:(E-Mail Removed)...
> 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
> >
> > "OfurGrn" <(E-Mail Removed)> a crit dans le message de
> > news:(E-Mail Removed)...
> > > 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



 
Reply With Quote
 
OfurGørn
Guest
Posts: n/a
 
      07-29-2005
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" <(E-Mail Removed)> a écrit dans le message de
> news:(E-Mail Removed)...
> > 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" <(E-Mail Removed)> a écrit dans le message de
> > > news:(E-Mail Removed)...
> > > > 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

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
asp.net 2 : asp:listbox doubleclick and fire event =?Utf-8?B?cGVsZWdrMQ==?= ASP .Net 1 08-31-2007 11:12 PM
No Doubleclick event on a Listbox control? Buddy Ackerman ASP .Net 1 05-19-2005 03:53 PM
DoubleClick Event on ListBox kgray@tecolote.com ASP .Net Building Controls 1 03-21-2005 04:59 PM
doubleclick row vs. ButtonColumns' click event Dennis Fricker ASP .Net Datagrid Control 0 10-20-2004 03:42 PM
DoubleClick on ListBox Mike ASP .Net 1 05-06-2004 11:41 AM



Advertisments