Re: How filter dropdownlist data

Tech-Archive recommends: Fix windows errors by optimizing your registry



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.







.



Relevant Pages

  • Re: How filter dropdownlist data
    ... Does the dropdown have a similar property? ... There are certain conditions where I want to PREVENT some selected items ... filter condition to produce a filtered array of rows. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Excel: How copy all rows that have a given column entry?
    ... I tried holding down the control key, and selecting the columns I wanted to ... column in which I am looking for entries greater than zero, ... "All" on the dropdown menu, ... I think I've got it now; and also by reading about "filter" ...
    (microsoft.public.excel.misc)
  • Re: report/form
    ... Create an updatable query with the data you want on your form. ... to include "" as a filter option along with any existing values) ... > any one's selection of some criteria parameter limits what ... > dropdown when I see this. ...
    (microsoft.public.access.formscoding)
  • Re: Excel: How copy all rows that have a given column entry?
    ... I was able to create the Show All and Autofilter icons this time. ... these columns that had the dropdown arrow on them. ... the primary column and applied the filter to it. ... With the All icon ...
    (microsoft.public.excel.misc)
  • Re: Excel: How copy all rows that have a given column entry?
    ... I was able to create the Show All and Autofilter icons this time. ... these columns that had the dropdown arrow on them. ... the primary column and applied the filter to it. ... With the All icon ...
    (microsoft.public.excel.misc)