473,405 Members | 2,373 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

multiple selection of listbox

Hi,
I have one combobox that contains the employee names. And another is listbox that contains the designation group, when i am selecting one name., suppose i selected the name 'nancy' from combobox then in the designation group automatically the employee and software engineer need to be selected(because nancy is an employee as well as a software engineer.)How is it possible and also i want to modify the designation group.suppose i want to change nancy from software engineer to tester.Pls reply fast its urgent

With regards,
Deepa
Nov 29 '08 #1
4 2085
Hi there.

Could you put your code here so we can help you?

If you're able to select one item in listbox, this will be the same steps to select the second. The only need is to configure your Listbox to accept multiple items select.

This is done in both design and running mode

I hope this help but put your code to be analized.

Rpicilli
Nov 30 '08 #2
debasisdas
8,127 Expert 4TB
Hi Deepa,

if you are using database all that can be filtered by using SQL queries and can also be updated to change group.
Nov 30 '08 #3
I have posted my code below.

Dim i, j As Integer
For i = 0 To Lstbx_Group.Items.Count - 1
For j = 0 To DataSet1.Tables(1).Rows.Count - 1
If DataSet1.Tables(1).Rows(0).Item(j).ToString = Lstbx_Group.Items(i).Value Then
Lstbx_Group.Items(i).Select()
End If
Next
Next


I am getting exceptions at line 4 and line 5 of this code

exception at line 4:
An unhandled exception of type 'System.MissingMemberException' occurred in Microsoft.VisualBasic.dll
Additional information: Public member 'Value' on type 'DataRowView' not found.

exception at line 5:
An unhandled exception of type 'System.MissingMemberException' occurred in Microsoft.VisualBasic.dll
Additional information: Public member 'Select' on type 'DataRowView' not found.

When I select a given employee, say 'Nancy' from a combobox I use a query to retrive all the designations for Nancy into a DataSet (DataSet1). Lstbx_Group is the list box which contains all the designations. In that list I want the designations of the employee 'Nancy' to be selected. Please could you help me achive this. Thanks in advance.
Dec 1 '08 #4
smartchap
236 100+
Iff the combobox and both listboxes (designation & Group) have same number of entries, in the click event of combobox & both list boxes you must write a code like this:
Suppose an item in combobox is selected.
Check its ItemNo.
select (automatically highlight) same ItemNo in both listboxes.
in this way in all the three boxes corresponding items get selected.

To change / modify an item you may place three command buttons one each for three boxes. Clicking first it will check itemno of selected item in combobox and ask for a new name. Then replace the new item with old one (keeping ItemNo same) so that new item / changed item will be at replaced place.

I think I am clear.
Dec 2 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: theoryboy | last post by:
I'm trying to implement multiple selection functionality in a Tix Hlist using a control-click. I've bound control-click to a function that uses selection_set to add to the selection, but it doesn't...
0
by: starace | last post by:
I have designed a form that has 5 different list boxes where the selections within each are used as criteria in building a dynamic query. Some boxes are set for multiple selections but these list...
2
by: DK | last post by:
Hello everybody ! I need little help from Your side. I have form called Form2, and ListBox called List 20. Property of List 20 allow multiple selection. Also I have query called Distribution as...
0
by: AK | last post by:
Hello, Listbox mulitselect property is set to true (extended). I am trying to implement drag and drop feature for a listbox. The drag & drop is done in the mouse move event (DoDragdrop...
0
by: Adis | last post by:
Asp.Net Visual Studio 2003 SQL Server. Hi, I have database in Sqlserver and ListBox (Multiple Selection Mode) in my Visual Studio Webform. I wish obtain various records from...
5
by: Lie | last post by:
Hi all, I have problem in getting selectedindex of multiple listbox selection in a datagrid. I have a listbox with multiple selection mode inside datagrid. In Edit mode, I need to get back all...
2
by: Dolorous Edd | last post by:
Hi, for a program I'm working on I need to be able to drag multiple files between Windows Explorer and a ListBox, in both directions. Implementing the "drag in" was pretty easy, but I can't find...
10
by: ads | last post by:
hi, after binding the dropdownlist to a datasource, ive experience this error "Cannot have multiple items selected in a dropdownlist" after using the code:...
9
by: Gummy | last post by:
Hello, I created a user control that has a ListBox and a RadioButtonList (and other stuff). The idea is that I put the user control on the ASPX page multiple times and each user control will...
2
by: billa856 | last post by:
Hi, My Project is in MS Access. In that I have one form in which I have some textboxes,comboboxes and listboxes. Now when I select value from 1st combobox(CustomerID) then it wil generate list for...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...

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.