Wednesday, March 21, 2012

populating a Drop down list

hello,
I need to populate a drop down list when the user clicks
on the arrow button.
how do i do this.
Should i use a html select control or is it possible
using the asp:dropdownlistBoth are ok.
for saving program code, you can choose DropDownList,
if your data come from db, two lines will give your the result
ddl.DataSource = yourProcedure;
ddl.DataBind();

> hello,
> I need to populate a drop down list when the user clicks
> on the arrow button.
> how do i do this.
> Should i use a html select control or is it possible
> using the asp:dropdownlist
>

What i mean is that the list should only be populated
when the user clicks on it.
Until then it should be empty

>--Original Message--
>Both are ok.
>for saving program code, you can choose DropDownList,
> if your data come from db, two lines will give your the
result
> ddl.DataSource = yourProcedure;
> ddl.DataBind();
>
clicks
>
>.
>
Can you supply your reasoning for this requirement? This is not the
normal usage of this type of control. You can certainly populate the
list based on selections from other controls, but it might be
difficult to do using the onclick event of the listbox itself.
On Mon, 5 Jul 2004 07:28:15 -0700, "Casey"
<anonymous@.discussions.microsoft.com> wrote:
>
>What i mean is that the list should only be populated
>when the user clicks on it.
>Until then it should be empty
>
>
>result
>clicks
Dan,
I am connecting to server at a distant location to
retrieve the data for the listbox, and the data has to be
loaded up only when the user wants to look at the
information,
I know there are other ways of doing this but this is
requested by the user
can you give me any ideas on this..

>--Original Message--
>Can you supply your reasoning for this requirement? This
is not the
>normal usage of this type of control. You can certainly
populate the
>list based on selections from other controls, but it
might be
>difficult to do using the onclick event of the listbox
itself.
>
>On Mon, 5 Jul 2004 07:28:15 -0700, "Casey"
><anonymous@.discussions.microsoft.com> wrote:
>
the
>.
>
There is a user event that occurs when you click on the dropdown list
I think (not 100% sure). You may be able to link to that. However...
If you are going to go to the server to get the data, this will be a
significant pause to build the list. Also, when you come back, you
would have to manually "open" that list as if you just clicked on it.
Not exactly a smooth transition.
I suggest that you should be able to determine when the list would
need to be built and do this when necessary. Worst case, provide a
button that says "Load List" that the user can click and then populate
the dropdown list.
On Mon, 5 Jul 2004 14:19:26 -0700, "Casey"
<anonymous@.discussions.microsoft.com> wrote:
>Dan,
> I am connecting to server at a distant location to
>retrieve the data for the listbox, and the data has to be
>loaded up only when the user wants to look at the
>information,
>I know there are other ways of doing this but this is
>requested by the user
>can you give me any ideas on this..
>
>
>is not the
>populate the
>might be
>itself.
>the
thanks for your help dan..
I will take your advice,
regards
casey

>--Original Message--
>There is a user event that occurs when you click on the
dropdown list
>I think (not 100% sure). You may be able to link to
that. However...
>If you are going to go to the server to get the data,
this will be a
>significant pause to build the list. Also, when you come
back, you
>would have to manually "open" that list as if you just
clicked on it.
>Not exactly a smooth transition.
>I suggest that you should be able to determine when the
list would
>need to be built and do this when necessary. Worst case,
provide a
>button that says "Load List" that the user can click and
then populate
>the dropdown list.
>
>On Mon, 5 Jul 2004 14:19:26 -0700, "Casey"
><anonymous@.discussions.microsoft.com> wrote:
>
be
This
certainly
possible
>.
>

0 comments:

Post a Comment