Hi,
Ok so I have 2 list boxes one is connected to a database the other isnt.
I want to be able to send the selected item from the listbox connected to the database to the one that isnt.
Ive written this code
listBox2.Items.Add(listBox1.SelectedItem);
But instead of copyin the item i get "
System.Data.DataRowView
Anyone havin any ...
I have 2 list boxes and want to be able to copy selected items from one to the other how ever many times I want. Ive managed to do this but I have buttons on the 2nd list box that allow me to go up and down..Now when theres to items in the second list box that are the same (e.g "gills" and "gills") it doesnt behave normally and crashes.
...
It seems like there has to be a way to do this:
I am applying an ItemContainerStyle in my Listbox, based on two property triggers. As you can see, I'm using the exact same set of trigger enter/exit actions, simply applied on two different properties. Is there something equivalent to a <Trigger Property="prop1" OR Property="prop2"> ???...
I have a webform with a ListBox control bind to a DataTable with a string column mapped(bound) to dataText field. This column retruns a string in all lowercase.
I want to display the string in title case(sometimes uppercase) what value should I assign to DataTextFormatString field to get this functionality? Is there any better way of do...
I have a form which contains a listbox which is connected to a dataset, listview and 2 picture boxes.
The data which fills the listbox is the title of a photo
When an item(title) is selected in the listbox the image that its related too shows up in picturebox1. This is fine ive got this all to work.
However I then should be able to mo...
Can anyone suggest the best way to display a Textblock (with a text such as "List Empty") so that it's visibility is bound to the Items.Count.
I have tried the following code and can't get it to work, so think that I must be doing it wrong.
<ListBox x:Name="lstItems"
ItemsSource="{Binding ListItems}">
</ListBox>
<T...
ok so here's my code
int rowNo = 0;
selected = listBox1.SelectedItem.ToString();
sqlSelectCommand2.Parameters["@title"].Value = selected;
sqlDataAdapter1.Fill(dataSet1);
byte[] tempByteArray = (byte[])dataSet1.photos.Rows[rowNo]["photo"];
MemoryStream pic = new MemoryStream(tempByteArray);...
I have a scenario where I have a globally available Properties window (similar to the Properties window in Visual Studio), which is bound to a SelectedObject property of my model. I have a number of different ways to browse and select objects, so my first attempt was to bind them to SelectedObject directly. For example:
<ListBox Items...
Where can I find some good documentation on data/element binding? My Google searches haven't turned much up. I had a custom class with two properties named Text and Value. When I tried binding a list to a listbox it wouldn't work. By chance I modifed my datatemplate from this
<TextBox Text="{Binding Text}"></TextBox>
to this
<TextBox...
My code
Add("STRING");
public void Add(string menu)
{
DataContext = menu.ToString();
}
XAML code of Listbox
<ListBox x:Name="menubox" ItemsSource='{Binding}' Margin="0,5,0,0" Height="244" Width="240" Background="Silver" BorderThickness="0" >
<ListBox.ItemTemplate>
<DataTemplate>
...
Hello,
I have a strange "problem". Could someone explain me why :
If I have in an ObservableCollection, twice (or more time) an item with the same value, then the selections of those values in the ListBox won't work properly ?
In fact, what the ListBox is doing when I click on an item(Even in single item selection) : It selects the fi...
Hi,
I use a listbox in (visualC++ 2008) as a log window, and I use SetItemHeight() to obtain some space between entries. How can I align my entries vertically so that they are vertically centered?
Thank You!!!
...
Hello Community!
I'm having some issues displaying a linkbar.
The data I need to display is in a XML file.
However, I couldn't get the linkbar to display a xmllist (I did indeed read that you cannot set a xmlllist as a linkbar dataprovider... ). So, I'm transforming the xmllist in a array of objects.
Here is some code.
XML file:
<d...
Hello all,
I am developing an ASP.NET web application that incorporates google maps. I have an ASP.NET listbox on my page which contains a list of items. When the user selects one of the items, I'd like to show this item on the map. The main complication lies in the fact that google maps uses javascript to control it and the listbox is ...
Ok, this is an embarassingly simple-looking problem, but is driving me crazy. I'm learning about DataTemplating and am trying to apply a very VERY simple ItemTemplate to a ListBox.
However, when I run my app, the template is completely ignored and I just get the standard-looking listbox, whereas in fact I'd expect to see a list of check...
I have a listbox and I want to loop through each of the items to see if the string im looking for is inside. I know I could do .contains but that wouldnt look at substrings. The code im using looks like this:
While tempInt > Listbox.items.count then
if searchString.contains(listbox(tempInt)) then
end if
tempInt+=1
end while
Everything...
Hi i'm trying to use the tag item of a listbox.
heres my code.
int number = 0;
foreach (ListViewItem item in listBox1.Items)
{
Tag tag = (Tag) item.Tag;
saveSlide(showid, tag.photoid, enumber);
number++;
}
problem im havin is when i run t...
Is there a a way to hid that arrow in a standard dropdown select fieldset?
Fiddle link
I have an autocomplete system where you fill in the organisation number of a company and it finds the info based on a database. I'd like to have the select box, but without the arrow..
I need it to do this as it's a double function form, either you...
So I have a list box that displays averages in a table like format from a crossyab query. It's just what I need the query is right, there is just one thing. I had to set the field properties in the query as format: standard..decimal:2. Which is exactly what I needed. However..the list box will not pick up on this.
First I typed the cro...
Is there a standard/best way to space items in a WPF ListBox, such that there is space between consecutive items, but not above the first or below the last?
To me, the most obvious way to add spacing is to modify the ItemTemplate to include space above, below, or both above and below each item. This, of course, means that there will be ...