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. But in foreach it is giving the following error:
Can not convert type 'Infragistics.Win.UltraWinListView.UltraListViewItem' to System.Windows.Forms.ListViewItem.
How can I eliminate this error?
The View list 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());
}
}