listview

Doubts in Using CustomListView

I just created a ListView, the itemclickevent works fine with it. But when i add a combox box to the list view, the focus goes within the selected object list in the object only, but cannot get the click event, but i can check or uncheck the checkBox. Any Ideas how to use this?I want the click event for selected object as well as the ch...

ListView inserted item's index

I have a ListView and sorting is enabled, once I insert an item, how do I get that item's index? I can use the ListViewItem returned by the Add method of ListView, but is its index before sort or after? And is it updated if it is sorted again? Like if I store the ListViewItem and the ListView is then sorted, will the ListViewItem I stor...

.NET Listview Copy Items

Is there a way to copy the entire contents of a listview from one control to another, without manually setting up the second one and iterating through each item? I'm thinking something like: ListView myNewListView = new ListView(); lvwExistingView.CopyTo(myNewListView); Or even: ListView myNewListView = new ListView(); lvwExistingVi...

Listview and rowspan

<tr> <td rowspan=2>outer listview</td> <td>inner listview</td> <td>inner listview</td> <td rowspan=2>outer listview</td> </tr> <tr> <td>inner listview</td> <td>inner listview</td> </tr> i want to have this kind of structure for a listview where the first and last td are outer list view, second and third td are inner li...

Custom listview with multiple values in a row

Hello , im trying to implement a custom listadapter that is set to display only distinct values for each row via the sql query. In each row i want to implement a list of textview values that displays data from another sql query. How can i implement an adapter like this ? ...

How to query the last sent SMS from content provider?[RESOLVED]

Hello, when I send an SMS on my Android emulator, it goes to the content provider: content://sms/sent right? So I wanted to get the last sent SMS from the content provider. So I used this Uri as you can see above, and, I used the method query, with the Content Resolver Object. And I got the cursor, and used the movetofirst() method, ...

How to update SimpleAdapter in Android

Is it possible to update a SimpleAdapter? I have a list of data and a footer that says "See Next Results" When that list item is clicked I capture the event and get new data. I then want to replace the data in the ListView with this new data but I can't figure out how to do it. Any Ideas? I don't want to use an ArrayAdapter, cause as...

Setting ListView scroll position nicely in Android

I am aware of setSelection(), setSelectionFromTop(), and setSelectionAfterHeaderView(), but none of them seems to do what I want. Given an item in the list, I want to scroll so that it is in view. If the item is above the visible window of the list, I want to scroll until the item is the first visible item in the list; if the item is b...

Do ListView's getFirstVisiblePosition and getLastVisiblePosition lie?

I've got my ListView on screen. It's scrolled to the top. I see 6 rows. And when I Log getFirstVisiblePosition() and getLastVisiblePosition(), it says 0 and 6. Is getLastVisiblePosition() actually returning the first non-visible position? In other words, should my test for whether a particular row is onscreen be not first <= row &&...

Android ListView with two columns that only takes up bottom part of the screen.

I'm trying to add a listview on the bottom of my opening activity that has two text items. Anyone know how to do this? I see stuff on how to do a listview with two columns, and how to do a listview at the bottom of an activity, but I can't find any that does both. ...

No data shown on listview

Here is my Arrival.java package one.two; import java.io.IOException; import java.util.ArrayList; import java.util.List; import android.app.ListActivity; import android.database.Cursor; import android.os.Bundle; import android.widget.ArrayAdapter; import android.widget.ListView; import android.widget.SimpleCursorAdapter; public class ...

about header columns within listview (C#)

string[] row1 = { "s1", "s2", "s3" }; string[] row2 = { "s1", "s2", "s3" }; ListViewItem item = new ListViewItem("col1"); item.SubItems.AddRange(row1); ListViewItem item1 = new ListViewItem("col2"); item1.SubItems.AddRange(row2); listView1.Items.AddRange(new ListViewItem[] { item, item1 }); listView1.View = View.Details; ....I added s...

How to access Item text using: foreach(var Item in ListView.SelectedItems){}

I'm trying to get the value of each selected item in a list view. Problem is that when I use Intellitext to find out what I can get out of "Item", my options are: Equals GetHashCode GetType ToString When I use ToString, I get the following: {Text = "ItemLabel"} When all I want is: ItemLabel foreach(var Item in ListView.SelectedIte...

ListView DataBound says Items > 0 when actually Items <= 0.

So I have a ListView (assignmentsListView) in an UpdatePanel, being filtered by a DropDownList in the same UpdatePanel. The DropDownList has a list of persons in it and uses autopostback, and the ListView shows the tasks those persons are assigned to. I am trying to use code similar to this: protected void assignmentsListView_DataBoun...

Jerky Scrolling when using SimpleCursorAdapter with ListView

Hi, I'm getting some very jerky scrolling while using the code below to create a ListView from a Cursor. Is there something I'm doing wrong, or any way to improve the performance of this ListView? bookmarksListView = (ListView)findViewById(R.id.bookmarks_listview); bookmarksDbCursor = bookmarkStore.getCur...

Capturing keyboard input on a List View control, C++

How do I capture key presses when a list view control has focus? My window creation code looks like // Window creation HWND hwnd = CreateWindowEx(WS_EX_TOPMOST | WS_EX_APPWINDOW, g_szClassName, "Test", WS_VISIBLE | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP | WS_SYSMENU, CW_USEDEFAULT, CW_USEDEFAULT, 209, 351, 0, 0, hInstance, 0);...

How to create a grouping listview based on fuzzy grouping

I have looked at Matt Berseth's Grouping Grid sample and have tried to adapt this to my needs, however my problem is a bit more sticky. I have two tables, call them LineItems and Headers. I need to Select all items from LineItems that meet a specific criteria, and group the items under various headers that are somewhat fuzzy. By fuz...

No data appearing in ListView, using SimpleCursorAdapter

With the below code, nothing appears in the ListActivity as I would expect. No errors are shown in logcat. Arrival.java package one.two; import java.io.IOException; import java.util.ArrayList; import java.util.List; import android.app.ListActivity; import android.database.Cursor; import android.os.Bundle; import android.widget.ArrayA...

Data still not able to be showed in Listview

I cant be able to show my data into a listview using this code which Ive found on a particular website. I am able to show all the images in listview but the data are not there! Someone please help! db = new DBAdapter(this); toptext = (TextView) findViewById (R.id.toptext); bottomtext = (TextView) findViewById...

How to customize a listview in Qt

I want to customize a listview in Qt, can anyone provide me some example or hints of how to do it? I am new to Qt. ...