Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > listbox and multiple selection

Reply
Thread Tools

listbox and multiple selection

 
 
Ant
Guest
Posts: n/a
 
      05-03-2005
I would like to get from a database several items and selected them in
a listbox but only selects one. Here is my code.

<asp:listbox id="lbTipoProy" runat="server" Width="152px"
CssClass="caja" Enabled="False"
SelectionMode="Multiple"></asp:listbox>

Dim drFilaTProy As DataRow
TTipoProyProgramas.fTTipoProyProgramasSEL(txtCodNo mbre.Text.Trim)
If Not TTipoProyProgramas.FilasResultados Is Nothing
Then
For Each drFilaTProy In
TTipoProyProgramas.FilasResultados
Dim TTipoProyPrograma As New TTipoProyPrograma
TTipoProyPrograma.IDProyecto =
drFilaTProy.Item("IDTipoProyecto")
item = New
ListItem(TTipoProyPrograma.IDProyecto)
lbTipoProy.SelectedIndex =
lbTipoProy.Items.IndexOf(item)
Next
End If
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Selection in Listbox when Edit the form =?Utf-8?B?V2FyYW4=?= ASP .Net 0 05-04-2006 09:54 PM
Getting Multiple selection in ListBox aroraamit81@gmail.com ASP .Net 10 02-27-2006 12:23 PM
Listbox selection to populate another listbox? Chris Kettenbach ASP .Net 3 06-16-2005 09:19 PM
Listbox and multiple selection antonio.echalecu@gmail.com ASP .Net Web Controls 2 05-02-2005 01:17 PM
selectedindex of multiple listbox selection in a datagrid =?Utf-8?B?TGll?= ASP .Net 5 12-14-2004 02:01 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57