473,569 Members | 2,698 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

disabling a listitem in a dropdownlist

Hi,

Is there to disable or hide a listitem in a dropdownlist?

Thanks
Nov 19 '05 #1
1 2081
Hello Loui,

If you mean by disabling an item is that it would not post back then you can
do that by using Javascript on the client to manipulate the onchange event.

For example in this demo
http://www.societopia.net/samples/dropdownlist_1c.aspx I give you 2 selection
lists; the first would decide which item in the second list would not
postback if selected.
--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Loui Mercieca" wrote:
Hi,

Is there to disable or hide a listitem in a dropdownlist?

Thanks

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
4430
by: Sebi | last post by:
Hello all, I'm thinking about overwriting the ListItem, so it can contain x additional values (not only one). Has anybody ever tried this? Has someone got an example (C#)? Can DropDownList handle overwritten Items, or will additional Data be lost? Thanks for any advice.
2
2196
by: Mad Scientist Jr | last post by:
I am populating a dropdownlist from SQL. The query returns the correct values (and no NULLs in any fields). The listitem.value is populated with an int ID field, and listitem.text with a varchar description field. The problem is, for some reason, I cannot access the numeric ID after item #5 in the dropdown box. After item #5, if I try to read...
4
2892
by: Hong Yip | last post by:
Hi Everyone, I have an array of checkboxlist. Everything works prefectly fine until I start working on the "presentation" view. I am not able to "insert" a checkbox item to a table cell. Something like that, TableCell TCell = new TableCell();
3
2394
by: Nathan Sokalski | last post by:
I want to change the background color, font attributes, etc. of the choices in my DropDownLists. When writing them using HTML SELECT and OPTION tags, I can do something like the following: <option style="font-weight:bold;color:green;background-color:purple;">Displayed Text</option> but the ListItem Control does not have a Style property,...
5
1848
by: Mark Rae | last post by:
Hi, Has the <asp:DropDownList> - <asp:ListItem> functionality changed in v2? In v1.1, the following works as expected: <asp:DropDownList ID="cmbStatus" Runat=server EnableViewState=False> <asp:ListItem Value=0>&nbsp;</asp:ListItem> <asp:ListItem Value=1>Awaiting</asp:ListItem> <asp:ListItem Value=2>Current</asp:ListItem> <asp:ListItem...
0
2281
by: John Smith | last post by:
This is what I am trying to do: <asp:datagrid id="DataGrid1" runat="server" AutoGenerateColumns="False"> <Columns> <asp:BoundColumn Visible="False" DataField="id" ReadOnly="True" HeaderText="ID"></asp:BoundColumn> <asp:TemplateColumn HeaderText="O"> <ItemTemplate> <asp:DropDownList id="cmbObdelaj" runat="server" AutoPostBack="True"...
0
3315
by: John Smith | last post by:
This is what I am trying to do: <asp:datagrid id="DataGrid1" runat="server" AutoGenerateColumns="False"> <Columns> <asp:BoundColumn Visible="False" DataField="id" ReadOnly="True" HeaderText="ID"></asp:BoundColumn> <asp:TemplateColumn HeaderText="O"> <ItemTemplate> <asp:DropDownList id="cmbObdelaj" runat="server" AutoPostBack="True"...
3
11005
by: Merennulli | last post by:
My problem child: <asp:dropdownlist id="ddlLimit" tabIndex="6" runat="server" EnableViewState="False" CssClass="query"> <asp:ListItem Value="100" Selected="True">100</asp:ListItem> <asp:ListItem Value="250">250</asp:ListItem> <asp:ListItem Value="500">500</asp:ListItem> </asp:dropdownlist> My intent is to make this a gradiation of...
5
37903
by: ssmeshack | last post by:
Hi All, Im using VWD 2008 (c#), I have a question here. Im having a dropdownlist like this: <asp:DropDownList ID="ddlIssue" runat="server" AutoPostBack="True" Height="24px" onselectedindexchanged="DropDownList2_SelectedIndexChanged" style="font-family: 'Arial';...
0
7697
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8120
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7968
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6283
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5512
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
1
2113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1212
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
937
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.