foreach (DataRow dr in dtStudentInfo.Rows) { Item = listView1.Items.Add(dr["strName"].ToString()); Item.Tag = dr["nId"].ToString(); }
For adding items to list view there is overloaded method which takes 3 parameters, with key, name and image index while retrieving use Find(key) or listView1.Items.IndexOfKey(key) listView1.Items.Add("key", "Text", 0);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)