private void PopulateMyStocksListView() { // clear the listView MyStocks_listView.Items.Clear(); // populate listView var rdr = DB_API.SelectAllAccountPurchasedStocks(this.account_id); while (rdr.Read()) { int ticker = (int)rdr[DB_API.StockEnt.ticker.ToString()]; string company = rdr[DB_API.StockEnt.company.ToString()].ToString(); int stockTypeId = (int)rdr[DB_API.StockEnt.stock_type_id.ToString()]; double purchasePrice = Double.Parse(rdr[DB_API.StockEnt.purchase_price.ToString()].ToString()); string purchase_price = String.Format(System.Globalization.CultureInfo.CurrentCulture, "{0:C2}", purchasePrice); var row = new string[] { ticker.ToString(), company, purchase_price }; var item = new ListViewItem(row); item.Tag = new Stock(ticker, stockTypeId, null, company, null, purchasePrice, this.account_id); MyStocks_listView.Items.Add(item); } }