listview

Android : Multiple Actions on a List View - Focus Issue

I would like to implement a ListView, which I can do no problem w/ my cursor. Right now depending on which row you click on it takes you to a new activity based on the information pressed on that row (just like it should, and as expected). I would like to have a button however to delete the row, so a user can press any part of the row to...

Automatic creation of ListViewSubItems

Hai, I tried to create a ListViewControl (tile mode) and added a ListViewItem. I created it like this, ListViewItem aFooItem = new ListViewItem("foo"); listView1.Items.Add(aFooItem); //Adding the ListViewItem to the ListViewControl Now I ran the application and tried to debug the first line. I found that the aFooItem's subitems cou...

How to properly bind a ListBoxItem in WPF ?

I have a listbox and I want to iterate over a collection of Bars in my Foo-object. <ListBox DataContext="{Binding Path=Foo.Bars}" > <ListBox.Items> <ListBoxItem> <ContentControl DataContext="{Binding Path=.}" /> </ListBoxItem> </ListBox.Items> </ListBox> This is the datatemplate I want to use. <Dat...

Font color of disabled listbox

Hi everybody! I want to draw some listview items disabled and would like to mimic the appearance of a disabled standard Windows listbox. Which colors does it use? I can't find anything in my reference chart :-) or with Google. Edit: Shortly after posting the obvious occurred to me - it seems to be COLOR_GRAYTEXT. ...

How to get a ListView (or DataGrid) work with TextWrapping (WPF)

I mean, i have one of this controls and text inside one of it's columns. Usually if user changes column size, it's just cutting text. If I'm trying to use template with textblock or textbox and set TextWrapping="Wrap" inside of the template - it's really doesn't change anything. What's the way out? *And yes, I searched before asking, an...

Binding Datetime types on Listview (WPF)

Hi there im using C# 3.5, this could be possible ? <EditItemTemplate> <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("date", "{dd/MM/YYYY}") %>'></asp:TextBox></EditItemTemplate> <ItemTemplate> I was trying : <ListView Margin="0,80,0,38" Name="dls...

WPF - List View Row Index and Validation

Hi, I have a ListView with TextBoxes in second column. I want to validate that my text box does not contain a number if the third column(data_type) is "Text". I am unable to do the validation. I tried a few approaches. In one approach I try to handle the MouseDown event and am trying to get the Row number so that I can get the data_typ...

Updating all ListView items together instead of one-by-one?

I have a invoice entry form in ASP.Net 3.5. I have a FormView for the main invoice form and a ListView for the invoice line items. I don't want to commit each line item to the database individually when the user edits them. I want to commit them all as a group when the user clicks a button to update the FormView. I suppose I could bind t...

.NET: ListView blues?

Selection count, .SelectedItems.Count, does not change when the Selected property is set to true on an item in the Items collection of an ListView. Example: lvPept.SelectedItems.Clear() lvPept.Items(6).Selected = True Dim newLen As Integer = lvPept.SelectedItems.Count lvPept is a ListView and contains 10 elements. newLen is ...

How do I get the header height of a Listview - c#

Can sombody tell me how to get the header height of a list view. Thanks ...

Android : BaseAdapter how to?

Ok, I have been searching thick and thin, and I am having some issues implementing a BaseAdapter. I have been able to implement a Simple Cursor Adapter http://code.google.com/android/samples/ApiDemos/src/com/example/android/apis/view/List7.html as per the example above. There is a pretty good BaseAdapter example here : List14 google e...

ListView MouseClick Event

Hi. I have a ListView whereby I want to display one context menu if an item is right-clicked, and another if the click occurs in the ListView control. The problem I'm getting is the MouseClick event is only firing when an item is right-clicked, not the control. What's causing this and how can I get around it? ...

Place a CheckBox in a ListViewSubItem

I'm trying to create a WinForms ListView control with 6 columns. The first two columns will have text in them, but I want the last for columns to have a checkbox in them. I know how to add a ListViewSubItem with text (did this for the second column), but how do you insert a CheckBox? ...

Android - How do I do a lazy load of images in ListView

Hi I am using a ListView to display some images and captions associated with those images. I am getting the images from the Internet. Is there a way to lazy load the images so while the text displays, the UI is not locked up and images are displayed as they are downloaded. The number of images is not fixed. Thanks. ...

Remove selected rows from multi-column listView

I have a listview with two columns and I'm using a context menu to allow users to remove selected rows. To remove the selected rows, I've tried with the following code but it doesn't work: private void toolStripMenuItem1_Click(object sender, EventArgs e) { listView1.SelectedItems.Clear(); } I suspect this is because the listview h...

Android BaseAdapter : position not really the position?

I am so confused when my list view using a BaseAdapter goes off the screen, each row no longer maintains a consecutive position. I don't know how else to explain it other than this. If my BA/LV shows 4 items on the screen, and I add a view that displays a TextView of each row, it shows 0,1,2,3 for the row numbers (which is correct). But...

ListView's DragEnter, DragOver, DragDrop event not raised (AllowDrop=True)

Hi all. This one is very weird: My app works just fine, but suddenly the damn ListView control's events are not raised any more. It just comes and goes without any clear reason. (Obviously) I've set the AllowDrop property to True and handled the DragEnter, DragOver and DragDrop events as follows: Private Sub lstApplications_DragDrop(B...

WPF ListView Databound Drag/Drop Auto Scroll

Hi there, I've been working with Bea's solution here for a while and finding it very helpful. Problem now I'm having is when I drag-n-drop items within or to another ListView control and I want to scroll up/down "during" the drag (moving an item from index 30 to index 1), it's not happening. I would have to drag to the top of the visua...

How do I align text for a single subitem in a ListView using C#?

I wasn't able to find an answer anywhere about this seemingly simple topic: is it possible to align text of a single subitem in a WinForms ListView control? If so, how? I would like to have text in the same column aligned differently. ...

WPF Listview bound with Hashtable

I already bind a listview (grid) with hashtable, so how can I get items from there? Before using hashtable I just did ListViewA.SelectedItems; and I was getting the source. Ir fails when I use two foreach loops: dlstTemplates is my ListView in WPF foreach (var group in dlstTemplates.SelectedItems) { foreach (var Template in group) ...