Disable Some Items In A Combobox?

Jan 27, 2009

Is it possible to disable some items in a combobox?Depending on the current mode that my application is in, certain items need to be enabled or disabled.I know that I could remove the items and rebuild the combobox but in this case I think that by showing the items greyed out it gives the user feedback as to what mode they are in and what options would be available to them if they decided to switch modes.

View 17 Replies


ADVERTISEMENT

Disable Particular Items In A Combobox?

Nov 11, 2011

Is there any option to disable particular items in a combobox?? If No then how can i do that??

I have 4 items in Combobox. For each items( based on combobox selected index change) lots of other calculation is there. i need to display all items but in some cases second item should be disabled.

View 2 Replies

Hide Or Disable Items In One Combobox?

Feb 25, 2009

how to hide or disable items in one combobox on the basis of selected item in another combobox in vb.net?

View 3 Replies

How To Disable ComboBox / ListBox Items

Nov 27, 2007

I need to extend a combobox to disable some listitems (i.e splits - "----------"). I reckon some APIs will be involved, and it could get complicated. That'll not put me off though. If anyone with usefull info on the subject could post it,

View 11 Replies

Enabled Propreties To Disable Editing Combobox Items?

Sep 27, 2011

i've tried the enabled propreties to disable editing combobox iteam but it make it gray and it become unreadable.so i changed the combobox style to simple (it looks like a texbox) and i want to know how can i prevent user from changing the content.

View 4 Replies

Dynamicaly Refresh Databound Combobox Items Based On Selected_index_changed Event Of Another Combobox?

Jan 27, 2010

I am using VB.NET together with ADO.NET to create a program. I have set my TableAdapters as needed and bound the correct tables-columns to my comboboxes.My problem though is this:My combobox2 item is bound to a datatable. The table adapter's Fill method (the select command basicaly) includes a public variable in the where clause to fetch the correct results. I ll put some code here to clarify it a bit more.Public Class Frm_inv

[Code]...

View 5 Replies

Get All Items From One Column Of Database Table To The Combobox Items

Apr 28, 2012

I want to get all items from one column of database table to the combobox items.

View 2 Replies

Combobox.items.add - Combobox To Have A List Of Choices From A Table In A Db

Jun 14, 2011

[Code]...

I'm making a combobox on a form. I want the combobox to have a list of choices from a table in a db. The two columns are a String and a Date. I want the date column to only show the year. I'm hoping I have the code right as it is above, but I'm not positive I've done the whole date thing right.

View 6 Replies

Select A Particular Value On A Combobox By Looping Through Combobox Items?

Jan 5, 2012

I have a form in my vb.net application used to take the data about the returned stock. The form contains two comboboxes. One, named combobox5, contains invoice numbers and the other, named combobox3, contains party codes. Both the comboboxes are pre_loaded using sqldataadapter.

Now what i want is to change the party code in combobox3 when the invoice number is changed in combobox5. Elaborating it further, When Stock is issued the party code is stored along with the invoice number to keep track of to which party was the stock issued. Now when stock is returned i want to keep track that which party has returned the stock and i want that the party code should be automatically selected when the invoice number is changed and it should be what is stored in the database against that particular invoice number....

I'm using the following code for doing so:

Private Sub ComboBox5_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox5.SelectedIndexChanged
' defines a new connection to the database
Dim con As New SqlConnection("Data Source=TAHA;Initial Catalog=ADT;Integrated Security=True")

[Code].....

View 1 Replies

Show/hide Another Combobox With Combobox Items?

Feb 3, 2012

i'm creating a simple search application which have a TEXT box and some combo boxes and radio buttons and a search button.radio button names "Videos", "Audios", "Pics" etc..when radiobutton of video is selected, a combobox is appear having options "DailyMotion", "Metacafe" etc I want that when i click "Metecafe" item in combobox of video, an other combo box appear having items Like "Entertainment", "How To", "+18" etc(categories of video search).

if combobox1.SelectedItem = "PAKISTAN" Then
combobox2.Visible = True
End if
if combobox1.SelectedItem = "INDIA" Then

[code]....

View 3 Replies

Manually Disable All The Items?

Mar 13, 2009

when running a process in a backgroundworker, do i need to manually disable all the items in my form to stop the user from any transactions while the backgroundworker is doing something and then enable them after

View 3 Replies

Combobox - Disable The Contextmenu?

Sep 20, 2010

I have a combobox and I want to disable to contextmenu. I tryed button1.focus() when the right mouse button is pressed on the combo but it doesn't work (it makes the focus and then the menustrip appears), I also put a msgbox but that's not a solution.Maybe something when the form is loaded? or globally disable the right click ability....

View 1 Replies

Disable Multiple Items From DropDownList?

Jun 6, 2011

I would like to disable a specific items from DropDownList. I have below code but it does not working. DropDownList have 5 items.And,I'm getting error:Index was out of range. Must be non-negative and less than the size of the collection.Parameter name: index

Protected Sub CheckBox1_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
Dim X As Integer = 0 <> 1
DropDownList1.Items(X).Enabled = False
End Sub

But, if I add a different value for X, then it disable 1st and 2nd item.

Protected Sub CheckBox1_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
Dim X As Integer = 0 or 1
DropDownList1.Items(X).Enabled = False
End Sub

My goal is if I would have a 365 items in DropwDownList to disable items for example between 120 and 150.

View 1 Replies

How To Enable And Disable Items Of Menu

Feb 6, 2010

In VB 6 I enabled and it incapacitated the items of the menu with the following expression. And in VB.net how to do to substitute this expression in my project?

View 7 Replies

Disable A Specific Item In Combobox?

Aug 10, 2010

Lets say have i have 5 items in the combobox

1
2
3
4
5

can i disable a specific item for example just #2?

View 16 Replies

VS 2008 Disable Editing A Combobox?

Mar 20, 2009

Is it possible to disable editing a combobox. With a textbox you have the option readonly. Is there something like that for the combobox?

View 7 Replies

Asp.net - Disable Each Items In Gridview According To The Textbox Text?

Dec 21, 2010

if booking closed column values is equal or more than textbox1 text then the book button in gridview will be disabled for each gridview item whose booking closed time is greater and equal to textbox1 time ..

How to do that ?

M using VS 2008 and vb

View 1 Replies

Asp.net - Disable Validation On All Items Inside A Panel?

Jul 22, 2011

is it possible to disable validation of all items inside a panel programatically in vb.net?

i can't seem to figure it out.

i disabled all fields inside a panel, but they still cause the page to validate on submit.

this is what i have now:

Public Sub DisableControls(ByVal parent As Control)
Dim cCon As Control
For Each cCon In parent.Controls

[Code]....

View 1 Replies

Disable Controls When Items Are Selected From A Combo Box?

Apr 30, 2011

How to disable other controls when an item is selected from a different combo box. When someone selects a specific item from the combo box provided, It should automatically disable other controls specified to be disable.

View 2 Replies

Disable Menu Strip Sub Items In An Application?

Jun 26, 2010

I am creating a user rights access to a menu. for example an administrtor account can access a sales report while a limited account cannot. What i mean is a customize menu for an administrator and limited user....

ex. administrator
Sales Report--->Daily sales-enable
limited account
Sales Report--->Daily Sales-disable

View 2 Replies

VS 2010 Disable Buttons While There Are Less Than 2 Items In A Listbox?

Feb 16, 2012

How do I disable buttons while there are less than 2 items in a listbox? I can't figure out how to do it. I'm a newbie in Visual Basic(programming at all)

View 7 Replies

Disable Mouse Scroll Wheel In Combobox?

Jun 3, 2010

Does anyone know of a way to disable the mouse scroll wheel when a control such as a ombobox or listbox has focus? For my purposes, combobox is all I need the answer for.I have a combobox set to trigger a SQL query on SelectedIndexChanged, and accidentally scrolling the wheel while the combobox has focus causes about six SQL queries to fire off simultaneously.

View 3 Replies

Disable Menustrip Items If Username And Menuname Match?

Feb 27, 2010

I have a DB table with the names of my Menus and a User names. After a User is logging succesfully I go through the table with the Menuitem names and enable /disable the menuitems accordingly.

Can anybody kindly show me a workaround on how to do this. For example i have this table below and after succesfully loging in as username "aaaaa". Menustrip items with name accounts and finance should be enabled and the rest like billing will be disable.

Table Name
UserAndMenu

[code]....

View 4 Replies

Disable Multiple Items From DropDownList. Someone Need To Check Code?

May 15, 2011

I would like to disable a specific items from DropDownList. I have below code but it does not working. So, need someone to told me what I'm doing wrong. DropDownList have 5 items.And, I'm getting error:Index was out of range. Must be non-negative and less than the size of the collection.Parameter name: index

Protected Sub CheckBox1_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged Dim X As Integer = 0 <> 1 DropDownList1.Items(X).Enabled = False End Sub

But, if I add a different value for X, then it disable 1st and 2nd item. Protected Sub CheckBox1_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged Dim X As Integer = 0 or 1 DropDownList1.Items(X).Enabled = False End Sub My goal is if I would have a 365 items in DropwDownList to disable items for example between 120 and 150.

View 2 Replies

Grey Out/disable Specific Items In The ListBox Control?

May 3, 2012

As far as I know, there is no way to grey out/disable specific items in the ListBox control? I want to make a list of surveys that need to be answered, but grey out/disable those that the user has already answered.Or is there some way to do it with ListBox?

View 1 Replies

Use Databindings To Enable/disable A Button When A Listbox Contains 0/1+ Items?

Aug 27, 2009

I can't seem to figure out how to use databindings to enable/disable a button when a listbox contains 0/1+ items?

Button1.DataBindings.Add("Enabled", ListBox1, "Items.Count")
Button1.DataBindings.Add("Enabled", ListBox1.Items, "Count")
Result = ArgumentException: Cannot bind to the property or column Count on the DataSource. Parameter name: dataMember

Button1.DataBindings.Add("Enabled", TextBox1, "Text.Length") ' This works?

View 2 Replies

Disable The User's Ability To Edit The Text In The Combobox?

Sep 3, 2009

Is there a way to disable the user's ability to edit the text in the combo-box, so that they can ONLY choose from the options in the drop-down list?

View 2 Replies

Disable MenuStrip Items Based On A UserAccess Table From Database?

Feb 15, 2011

each of the ToolStripMenuItems has more than 20 ChildItems and each of these ChildItems have more than 30 ChildItems.In my form I havea login form and each user must log in.I want to know that how can I check my UserAccess Table with these MenuItems and ChildItems names and if the user does not have the MenuItem or ChildItem name in UserAccess Table, the MenuItem or ChildItem must be disabled.

View 16 Replies

Disable Menu Items Based On Allowed Security Roles Specified For An Item?

Nov 23, 2009

How to enable / disable menu items based on allowed security roles specified for an item.

View 6 Replies

Select Radio Button Then Respective Combobox Enable And Remainig Disable?

Jun 11, 2011

i m doing project in vb and database is microsoft accessin my form i have 3 radiobuttons and 3 combobox when i select radio button then respective combobox enable and remainig disable i load all the data in combobox through data reader the problem is user can select different radio button so as query also changes to fetch the data from databse whenever i select 1 rasio buttons its work whenever select it not work
[code]...

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved