DataTable AccountDt=DT; if (AccountDt != null) { ArrayList ArrList = new ArrayList(); int i = 1; foreach (DataRow Dtr in AccountDt.Rows) { ListViewItem lvi = new ListViewItem(); lvi.Tag = Dtr["AccountId"].ToString(); lvi.Text = i.ToString(); lvi.SubItems.Add(Dtr["AccountName"].ToString()); lstvAccount.Items.Add(lvi); i++; } }