listbox

Do you know why introducing jquery ui autocomplete for my dropdown boxes is also changing my listbox ?

I am trying to change my comboboxes to use autocomplete so i leverage the code listed here (which worked perfectly for my dropdowns) The issue is that i also on the same page have a listbox with the following code: <%= Html.ListBox("Cars", Model.BodyParts.Select( x => new SelectListItem { Tex...

Programmatically Scroll Silverlight ListBox

I tried using the following method, but it doesn't seem to work on databound listbox. mylistbox.ScrollIntoView(mylistbox.Items[mylistbox.Items.Count - 1]) I also tried to grab the IScrollProvider with no success: var lbItemAutomation = (ListBoxAutomationPeer)ListBoxAutomationPeer.CreatePeerForElement(mylistbox); var listBoxScroller ...

Trapping events within list box item templates in WPF

I've got listbox that employs an item template. Within each item in the list, as defined in the template there is a button. When the user clicks the button I change a value in the data source that defines the sort order of the list. Changing the datasource is not a problem as this is working just fine within my application template. How...

Setting properties of auto-generated listboxitem

I am trying to set the inputbindings of the auto-generated ListBoxItems of a databound ListBox. The code below does not work. The compiler complains that "The Property Setter 'InputBindings' cannot be set because it does not have an accessible set accessor." What is the correct syntax to set the InputBindings? <ListBox.ItemContainer...

how do you unselect all items from a listbox using jquery

is there a way to unselect all items of a listbox using jquery without looping through each item? ...

theming jquery ui with multiselect listboxes

it doesn't seem that jquery ui themes does anything to multiselect listboxes. does anyone know the reason why or have any way of having multiselect listboxes match the theme of other ui elements when using jquery ui theming css? ...

Appending text to each item in a Listbox

Hi, I need to loop through all the items in a listbox and append text to each item.If i have 3 items (item1,item2,item3) in my listbox,i need to append (item1=A,item2=B,item3=C,....) Can anyone please help me ? Thanks. vincent. ...

ListBoxItem IsSelected style

I still didn't get it. Could you please show me exactly how to override ListBox's default behavior. Everytime when ListBoxItem is selected the Border's background should be changed. Not the background of the whole row but only background of the border which's specified. <ListBox ItemsSource="{Binding Source={StaticResource Asset...

Bind listbox in WPF with grouping

Hi, I've got a collection of ViewModels and want to bind a ListBox to them. Doing some investigation I found this. So my ViewModel look like this (Pseudo Code) interface IItemViewModel { string DisplayName { get; } } class AViewModel : IItemViewModel { string DisplayName { return "foo"; } } class BViewModel : IItemViewModel { ...

2 listbox to exchange value with DBML

Hi, i'have two Listbox. the think is i do the transfert like : click on field in the left listbox, hit "move right" button and it wll display in the right list box.' The other think it's the first Listbox is bind on Dataset and the second on Entity (Linq-to sql). So when i click on the move next i do that : Dim newSite As New List(Of v...

Can't convert ListBox.ObjectCollection to a (typed) array

I want to convert the items to a String array or the type that I used to fill the ListBox.DataSource. The type has overridden ToString() but I can't seems to get it converted, not even to String[]. String[] a = (String[])ListBox1.Items; Contacts[] b = (Contacts[])ListBox1.Items; ...

How to disable scroll event of listbox after the keydown or keypress event?

Programming language is vb.net ...

How to access a control placed inside data template of listbox?

Hi I have the following code: <ListBox x:Name="foldersListBox" Grid.Column="0" MouseLeftButtonUp="foldersListBox_MouseLeftButtonUp" BorderThickness="0" Height="AUTO" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrol...

How to Disable dynamic searching when typing in a listbox

Programming language is vb.net ...

.NET 3.5 Listbox Selected Values (Winforms)

I am BATTLING to get the selected values (please note VALUES not TEXT) from a Winforms Listbox that has multi-select enabled and has been bound to a database table getting the Name (as DisplayMember) and ID (as ValueMember) - I need the ID of the selected items. The listbox control has properties for SelectedValue to get one of the sele...

How to remove all ListBox items?

Hi, I created two RadioButton (Weight and Height). I will do switch between the two categories. But the they share the same ListBox Controllers (listBox1 and listBox2). Is there any good method to clear all the ListBox items simpler? I didn't find the removeAll() for ListBox. I don't like my complex multi-lines style which I posted here...

WPF - Animate ListBox.ScrollViewer.HorizontalOffset?

WPF - Animate ListBox.ScrollViewer.HorizontalOffset Has anybody got a complete solution to animating the listboxitem position on some event Cheers Nick ...

How can I display both Button and Button Name in Listbox Item from Code behind?

Hi I have the following code , which assign a list of custom radio buttons to my List Box. List<RadioButton> listUserControlBtns = new List<RadioButton>(); CustomLocalFolderButton btnLocalFolder = new CustomLocalFolderButton (); CustomLocalFolderButton btnPlayListFolder = new CustomLocalFolderButton (); CustomVideoButton btnVideoFolder...

Choice of a deleted element at ListBox control

Hi I have created a listbox control with following DataTemplate <DataTemplate x:Key="lb_Itemtemplate"> <DockPanel> <TextBlock Text="{Binding}" DockPanel.Dock="Left" /> <Button DockPanel.Dock="Right" Template="{StaticResource ButtonTemplate }" Width="20" Margin=" 0,1,1,10" >Delete </...

LB_SETTABSTOPS does not appear to affect a CheckedListBox

I am trying to set tab stops in a CheckedListBox in my WinForms application, but no matter what I do, it does not seem to have any effect. I have the following in the code for my form: <DllImport("user32.dll")> _ Public Sub SendMessage(ByVal hWnd As IntPtr, ByVal uMsg As Int32, ByVal wParam As Int32, ByRef lParam As Int32) End Sub Publ...