Re: How filter dropdownlist data
- From: "George Ter-Saakov" <gt-nsp@xxxxxxxxxxx>
- Date: Wed, 28 May 2008 10:46:15 -0400
How about not bounding it
just populate the dropdown manually...
something like (in pseducode):
DataTable dt = GetData("SELECT...");
foreach(DataRow r in dt.Rows)
{
ListItem it = new ListItem((string)r[0], (string)r[1]);
cmbMyDropDown.Items.Add(it);
}
George.
"Cirene" <cirene@xxxxxxxxxxx> wrote in message
news:ugHvW5MwIHA.4896@xxxxxxxxxxxxxxxxxxxxxxx
I already have it bound to a sqldatasource and it's getting data. That's
no problem.
There are certain conditions where I want to PREVENT some selected items
from appearing in the drop down list. Any ideas on how to do this?
Thanks!
"Eliyahu Goldin" <REMOVEALLCAPITALSeEgGoldDinN@xxxxxxxxxxxx> wrote in
message news:ej%23hFyMwIHA.548@xxxxxxxxxxxxxxxxxxxxxxx
If the query populates a DataTable, you can run Select method with a
filter condition to produce a filtered array of rows.
--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Cirene" <cirene@xxxxxxxxxxx> wrote in message
news:%23QUUxpMwIHA.4476@xxxxxxxxxxxxxxxxxxxxxxx
I have a dropdownlist that is bound to a query.
Is it possible to further filter the items after the fact?
The dropdownlist is inside a
createuserwizard/createuserstep/contenttemplatecontainer.
Thanks.
.
- References:
- How filter dropdownlist data
- From: Cirene
- Re: How filter dropdownlist data
- From: Eliyahu Goldin
- Re: How filter dropdownlist data
- From: Cirene
- How filter dropdownlist data
- Prev by Date: Re: webpage has expired after file upload
- Next by Date: Re: Access DataSource in code
- Previous by thread: Re: How filter dropdownlist data
- Next by thread: Re: How filter dropdownlist data
- Index(es):
Relevant Pages
|