Home All Groups Group Topic Archive Search About
Author
8 Jul 2005 12:58 PM
jack-e
Hi,

Senario: i have a dropdownlist which is bound to a lookup table.

question: how do i insert headings into the dropdownlist which cannot
be selected, without altering the selected values of the other bound
items?

Thanks.

Jack

Author
8 Jul 2005 1:13 PM
Eirik Eldorsen
Hi

Just use the following code:

ListItem item = new ListItem("Header", "somevalue");
ddlCategory.Items.Insert(0, item);
// OR //
ddlCategory.Items.Insert(0, "Header");

--
Eirik Eldorsen


Show quoteHide quote
"jack-e" <jac***@humlog.com> skrev i melding
news:1120827522.063766.117390@g47g2000cwa.googlegroups.com...
> Hi,
>
> Senario: i have a dropdownlist which is bound to a lookup table.
>
> question: how do i insert headings into the dropdownlist which cannot
> be selected, without altering the selected values of the other bound
> items?
>
> Thanks.
>
> Jack
>
Author
8 Jul 2005 1:44 PM
jack-e
how do i disable the item so the user can't select it?
Author
8 Jul 2005 3:00 PM
Mantorok
"jack-e" <jac***@humlog.com> wrote in message
news:1120830281.508353.297360@g14g2000cwa.googlegroups.com...
> how do i disable the item so the user can't select it?
>

ListItem li = new ListItem("Text", "Value");
li.Enabled = false;

Kev