using simple Cursor adapter

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

using simple Cursor adapter

Postby imdolly » Mon Oct 26, 2009 6:43 am

Hi,

I am trying to display two columns from a cursor using listview. howevr i am able to print the values of these columns, using println. but when i try to display it using listview it displays only one column.

Can someone help me out with this.
a piece of code where i am facing problem is as below.



ListAdapter adapter = new SimpleCursorAdapter(this, R.layout.row,
mCursor, new String[] {LDAPContact.LDAPContactColumns.NAME,LDAPContact.LDAPContactColumns.TELEPHONENUMBER},
new int[] { R.id.title, R.id.value });

LdapSearchEntriesView.setAdapter(adapter);


here i am retrieving ldap entries (from a cursor) and finally displayin. all is working fine except in d display only the names(first column) are being displayed, though i want to display name as well as telephone number (second column).


Kindly, resolve dis query of mine, if you could.

Thanks a lot.
imdolly
Once Poster
Once Poster
 
Posts: 1
Joined: Mon Oct 26, 2009 6:28 am

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: No registered users and 5 guests