5
private void Checked()
{
foreach (ListViewItem listItem in listView.Items)
{
if (cb_selectAll.Checked == true)
{
listItem.Checked = true;
}
if (cb_selectAll.Checked == false)
{
listItem.Checked = false;
}
}
}
I have this code here. Only in the foreach is giving the following error:
Cannot Convert type 'Infragistics.Win.Ultrawinlistview.Ultralistviewitem' to System.Windows.Forms.Listviewitem.
How can I eliminate that mistake?
The list view looks like this :
private void Search()
{
mUpdater = new DatabaseUpdaterService();
mUpdater.Initialize(false, null);
DataTable dt = mUpdater.GetVersionCheckBoxToUpdate();
foreach (DataRow row in dt.Rows)
{
this.listView.Items.Add(row["ID"].ToString(), row["Version"].ToString());
}
}
thank you very much. I’m still new at this.
– Ana Carvalho