I Want To List All Tables in sqlite database table,
When i tries to List the table contents It Only Shows the First columns of table.
AXML Page:;
"http://schemas.android.com/apk/res/android" - android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="0dp"
- android:clickable="true"
- android:divider="#b5b5b5"
- android:dividerHeight="1dp"
- android:id="@+id/listView1" />
- string dpPath = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "BookmarkSqlite.db3");
- var db = new SQLiteConnection(dpPath);
- var data = db.Table
(); - foreach (var listing in data)
- { var from = new string[]{ listing.SiteName + "----" + listing.SiteUrl };
- //var from = fromm.ToList();
- ListView listtable = (ListView)FindViewById(Resource.Id.listView1);
- listtable.Adapter = new ArrayAdapter(this, Android.Resource.Layout.SimpleListItem1, from);
- }
- }
- listtable.Adapter = new ArrayAdapter(this, Android.Resource.Layout.SimpleListItem1, from.ToList());
-
Logesh PalaniPosted Dec 21, 2018, 8:27 PM