Google Groups Home
Help | Sign in
I am trying to update the datasource of a drop-down box Options
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  15 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
stapes  
View profile
(1 user)  More options May 12, 12:11 pm
From: stapes <steve.sta...@gmail.com>
Date: Mon, 12 May 2008 09:11:24 -0700 (PDT)
Local: Mon, May 12 2008 12:11 pm
Subject: I am trying to update the datasource of a drop-down box Options
Hi

I thought I would try this question again as I didn't get a
satisfactory reply first time.

Within a Form View (fvSingleLineOrders), I have two DropDownLists.
The
first, ddSiteTypes, contains a selection of Site Types. The second
(ddDestinations), is to contain a different selection based on the
choice of Site Type.
Here is my code:

protected void ddSiteTypes_SelectedIndexChanged(object sender,
EventArgs e)
    {
        DropDownList myList =
(DropDownList)fvSingleLineOrders.FindControl("ddSiteTypes");
        int number = Convert.ToInt32(myList.SelectedValue);
        Session["siteTypeID"] = number;
        fvSingleLineOrders.DataBind();
    }

Unfortunately, this resets all the other fields on the form.
How can I make it so it only updates ddDestinations?
fvSingleLineOrders is a Form View Control. It has its own databinding
code. I only want to update one field on the form - ddDestinations

Stapes


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Crisatunity (blog.crisatunity.com)  
View profile
 More options May 12, 3:33 pm
From: "Crisatunity (blog.crisatunity.com)" <cleveridea....@gmail.com>
Date: Mon, 12 May 2008 12:33:06 -0700 (PDT)
Local: Mon, May 12 2008 3:33 pm
Subject: Re: I am trying to update the datasource of a drop-down box Options
What basis do you have that posting the same question twice will yield
different results?  Your first premise reads: "please let me waste
your time".  Regardless, it is a simple sort of thing you are asking
so can't believe wasn't answered satisfactorily the first time you
asked it.

#1 make sure you are only binding to your first dropdown data source
when !IsPostback, and
#2 make sure that dropdown causes postbacks (not the default behavior
on the property pages)

Am I missing something?

On May 12, 11:11 am, stapes <steve.sta...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
stapes  
View profile
(1 user)  More options May 13, 4:35 am
From: stapes <steve.sta...@gmail.com>
Date: Tue, 13 May 2008 01:35:04 -0700 (PDT)
Local: Tues, May 13 2008 4:35 am
Subject: Re: I am trying to update the datasource of a drop-down box Options

On 12 May, 20:33, "Crisatunity (blog.crisatunity.com)"

<cleveridea....@gmail.com> wrote:
> What basis do you have that posting the same question twice will yield
> different results?  Your first premise reads: "please let me waste
> your time".  Regardless, it is a simple sort of thing you are asking
> so can't believe wasn't answered satisfactorily the first time you
> asked it.

http://groups.google.co.uk/group/DotNetDevelopment/browse_thread/thre...

> #1 make sure you are only binding to your first dropdown data source
> when !IsPostback, and
> #2 make sure that dropdown causes postbacks (not the default behavior
> on the property pages)

> Am I missing something?

I don't know how to do that, that is why I am asking. Here is the
field I want binding to:

</asp:DropDownList>destination / site:<asp:DropDownList
ID="ddDestination" runat="server" DataSourceID="SqlDestinations"
                        DataTextField="destinationName"
DataValueField="siteID" SelectedValue='<%# Bind("destinationID") %>'
                        Width="264px"  >
                    </asp:DropDownList><br />


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gomerbiz  
View profile
(1 user)  More options May 13, 10:20 am
From: Gomerbiz <gomer...@iname.com>
Date: Tue, 13 May 2008 07:20:52 -0700 (PDT)
Local: Tues, May 13 2008 10:20 am
Subject: Re: I am trying to update the datasource of a drop-down box Options
Or in other words:

I'm better than you so let me be condescending and belittle you. Then
and only then will I agree to be helpful.

On May 12, 2:33 pm, "Crisatunity (blog.crisatunity.com)"


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrew Badera  
View profile
(1 user)  More options May 13, 1:24 pm
From: "Andrew Badera" <and...@badera.us>
Date: Tue, 13 May 2008 13:24:31 -0400
Local: Tues, May 13 2008 1:24 pm
Subject: Re: [DotNetDevelopment] Re: I am trying to update the datasource of a drop-down box Options

1. Not really. The list is noisy. The list has rules. The OP is making it
noisier, and violating a rule.
2. So what was YOUR purpose here? Just to stop in, take a pee on someone's
leg, and leave, also without being helpful?

OP: please regard the rules of the forum. By breaking the rules, you make
the experience less pleasant for us all, and will tend to incline yourself
towards getting less help.

--
--
--Andy Badera
http://higherefficiency.net
http://flipbitsnotburgers.blogspot.com/
http://andrew.badera.us/
http://changeroundup.com/
and...@badera.us
(518) 641-1280
Google me: http://www.google.com/search?q=andrew+badera

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
stapes  
View profile
(1 user)  More options May 14, 4:31 am
From: stapes <steve.sta...@gmail.com>
Date: Wed, 14 May 2008 01:31:42 -0700 (PDT)
Local: Wed, May 14 2008 4:31 am
Subject: Re: I am trying to update the datasource of a drop-down box Options
Still no solution to my initial problem. What is wrong with you guys?
If you can't give me a straightforward answer, then shut up.

On May 13, 6:24 pm, "Andrew Badera" <and...@badera.us> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Crisatunity (blog.crisatunity.com)  
View profile
(1 user)  More options May 14, 1:56 pm
From: "Crisatunity (blog.crisatunity.com)" <mich...@crisatunity.com>
Date: Wed, 14 May 2008 10:56:42 -0700 (PDT)
Local: Wed, May 14 2008 1:56 pm
Subject: Re: I am trying to update the datasource of a drop-down box Options
You will always get grief for spreading a single question across
multiple threads; deal with it. -- Improve *yourself* in this regard
before you do it again.

And, I gave you a straightforward answer.  You are too stupid or lazy
or both to try and understand it.  Good luck.

On May 14, 3:31 am, stapes <steve.sta...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrew Badera  
View profile
 More options May 14, 3:19 pm
From: "Andrew Badera" <and...@badera.us>
Date: Wed, 14 May 2008 15:19:59 -0400
Local: Wed, May 14 2008 3:19 pm
Subject: Re: [DotNetDevelopment] Re: I am trying to update the datasource of a drop-down box Options

+9000

On Wed, May 14, 2008 at 1:56 PM, Crisatunity (blog.crisatunity.com) <

mich...@crisatunity.com> wrote:

> You will always get grief for spreading a single question across
> multiple threads; deal with it. -- Improve *yourself* in this regard
> before you do it again.

> And, I gave you a straightforward answer.  You are too stupid or lazy
> or both to try and understand it.  Good luck.

> On May 14, 3:31 am, stapes <steve.sta...@gmail.com> wrote:
> > Still no solution to my initial problem. What is wrong with you guys?
> > If you can't give me a straightforward answer, then shut up.

--
--
--Andy Badera
http://higherefficiency.net
http://flipbitsnotburgers.blogspot.com/
http://andrew.badera.us/
http://changeroundup.com/
and...@badera.us
(518) 641-1280
Google me: http://www.google.com/search?q=andrew+badera

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
adityo dwiarto  
View profile
 More options May 14, 10:17 pm
From: "adityo dwiarto" <adityodwia...@gmail.com>
Date: Thu, 15 May 2008 09:17:03 +0700
Local: Wed, May 14 2008 10:17 pm
Subject: Re: [DotNetDevelopment] Re: I am trying to update the datasource of a drop-down box Options

* If you can't give me a straightforward answer, then shut up.*

Dear Stapes,

as I learn from my 2 weeks stay in this forum, some of the most active
people here (maybe moderators) are actually sharp-tongued people, plain
ignorant with the level of your urgency, or just having fun teasing their
inferiors. but all of it does not matter 'coz you shouldn't rely on
everything (your actual problem to be solved) here in the forum. this forum
can actually be a great place to learn -or at least to motivate yourself to
learn elsewhere.

and no, those people will not shut up, 'coz they DO give solutions,
sometimes as crystal clear, (never straight-up to the codes as far to my
knowledge), but most of the time just talking about the concepts, where it
gets back to yourself on building the solution out of the scraps. though
about being straightforward or not, I'm afraid that's a one relative
statement that different people may feel depending on your programming
level/skills..

loosen up and have a little sense of humor, I hope you'd enjoy your stay
here as much as I have.

ps: as a newbie I'd use temporary variables to reload all fields and make
sure they do not resets while one or two fields (DropDownList) being
updated. hope it helps


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
stapes  
View profile
(1 user)  More options May 15, 6:13 am
From: stapes <steve.sta...@gmail.com>
Date: Thu, 15 May 2008 03:13:56 -0700 (PDT)
Local: Thurs, May 15 2008 6:13 am
Subject: Re: I am trying to update the datasource of a drop-down box Options