By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,854 Members | 833 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,854 IT Pros & Developers. It's quick & easy.

Varying the contents of a Dropdown within a Gridview

P: n/a
I have a gridview with 4 columns. Two of the columns are read-only and
two are editable. The two editable columns are listboxes leveraging an
ObjectDataSource. The first listbox is populated from a table of
static information, the second listbox is more problematic.

If the contents of the first listbox contains one specific value, I
want to populate the second listbox with the results of QueryA when
the row is edited. If the contents of the first listbox contains any
other value, I want to populate the listbox with the results of QueryB
when the row is edited.

QueryA and QueryB are performed against the same table, but require
different sets of parameters. Query A requires no parameters, QueryB
requires 1 parameter.

Can anyone point me in the right direction as to how I might achieve
this?

Feb 21 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On 21 Feb, 09:55, servernet1...@hotmail.com wrote:
I have a gridview with 4 columns. Two of the columns are read-only and
two are editable. The two editable columns are listboxes leveraging an
ObjectDataSource. The first listbox is populated from a table of
static information, the second listbox is more problematic.

If the contents of the first listbox contains one specific value, I
want to populate the second listbox with the results of QueryA when
the row is edited. If the contents of the first listbox contains any
other value, I want to populate the listbox with the results of QueryB
when the row is edited.

QueryA and QueryB are performed against the same table, but require
different sets of parameters. Query A requires no parameters, QueryB
requires 1 parameter.

Can anyone point me in the right direction as to how I might achieve
this?
I should also add, that I need to do 2-way data binding with the
dropdown lists so that the table that underlies the Gridview is
updated.

Feb 21 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.