PC Review


Reply
 
 
Simon
Guest
Posts: n/a
 
      17th Jan 2008
I'm coming from a php / coldfusion background, and while most things
look straigtforward, I'm puzzeled by a couple of things

Drag and drop tools are great, but what happens when I want the
following to happen

Two drpodowns , DDa and DDb are both databound to tables in a
database. When DDa's selected value changes, DDb's items are reduced.

Do I need to code behind and "manually" add/remove items from DDb?
Is there some way I can do this without coding behind?

If I change DDb to a radio list, would this change the way I
repopulate it?

 
Reply With Quote
 
 
 
 
Chad Scharf
Guest
Posts: n/a
 
      17th Jan 2008
Are you using the SqlDataSource or ObjectDataSource control for databinding?
If so, you should be able to add an <asp:ControlParameter ControlID="DDa" />
in your <SelectParameters> collection or add this "Where..." clause in the
datacontrol designer. Then just set the AutoPostBack="true" on the first drop
down list, handle the SelectedIndexChanged event and call DDb.DataBind().

Both RadioButtonList and DropDownList are both use the same construct for
storing and enumerating ListItems. Therefore if you wanted to change the
control type, your datasources, and even code-behind event handler could
remain the same.

--
Chad Scharf
_______________________________
http://www.chadscharf.com


"Simon" wrote:

> I'm coming from a php / coldfusion background, and while most things
> look straigtforward, I'm puzzeled by a couple of things
>
> Drag and drop tools are great, but what happens when I want the
> following to happen
>
> Two drpodowns , DDa and DDb are both databound to tables in a
> database. When DDa's selected value changes, DDb's items are reduced.
>
> Do I need to code behind and "manually" add/remove items from DDb?
> Is there some way I can do this without coding behind?
>
> If I change DDb to a radio list, would this change the way I
> repopulate it?
>
>

 
Reply With Quote
 
Chad Scharf
Guest
Posts: n/a
 
      17th Jan 2008
Are you using the SqlDataSource or ObjectDataSource control for databinding?
If so, you should be able to add an <asp:ControlParameter ControlID="DDa" />
in your <SelectParameters> collection or add this "Where..." clause in the
datacontrol designer. Then just set the AutoPostBack="true" on the first drop
down list, handle the SelectedIndexChanged event and call DDb.DataBind().

Both RadioButtonList and DropDownList are both use the same construct for
storing and enumerating ListItems. Therefore if you wanted to change the
control type, your datasources, and even code-behind event handler could
remain the same.

--
Chad Scharf
_______________________________
http://www.chadscharf.com


"Simon" wrote:

> I'm coming from a php / coldfusion background, and while most things
> look straigtforward, I'm puzzeled by a couple of things
>
> Drag and drop tools are great, but what happens when I want the
> following to happen
>
> Two drpodowns , DDa and DDb are both databound to tables in a
> database. When DDa's selected value changes, DDb's items are reduced.
>
> Do I need to code behind and "manually" add/remove items from DDb?
> Is there some way I can do this without coding behind?
>
> If I change DDb to a radio list, would this change the way I
> repopulate it?
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
newbie with newbie questions JohnE Microsoft ASP .NET 3 17th Aug 2009 11:10 PM
C# Newbie Gilbert Microsoft C# .NET 5 24th Oct 2008 08:47 AM
Real Newbie newbie question Dave Microsoft Excel New Users 1 10th Jan 2007 07:55 PM
NewBie help. archana Microsoft C# .NET 1 12th May 2006 12:18 PM
Newbie Pls help =?Utf-8?B?U2lsZWVzaA==?= Microsoft Excel Programming 5 12th Nov 2004 05:47 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:38 PM.