Good afternoon! I have a listView with several checkbox's. I want to count all the checkbox files that are selected. I made the following code, but it is not working.
if (listView.Items[j].CheckState == CheckState.Checked)
{
string countVersions = listView.CheckedItems.Count.ToString();
{
try
{
UltraListViewItem item = listView.Items[j];
{
int countVerao = int.Parse(countVersions);
for (int i = 0; i <= countVerao + 1; i++)
{
DataBaseUpdate dataBaseUpdate = mUpdater.GetDataBaseUpdateByID((int)item.Tag);
DataBaseUpdateFilesCollection dataBaseUpdateFilesCollection = mUpdater.GetDatabaseUpdateFilesByDataBaseUpdate(dataBaseUpdate.ID);
countFiles = dataBaseUpdateFilesCollection.Count.ToString();
totalFiles = totalFiles + int.Parse(countFiles);
}
DataBaseUpdateFilesCollection dataBaseUpdateFilesCollection1 = mUpdater.GetDatabaseUpdateFilesByDataBaseUpdate(dataBaseUpdate.ID);
mProgressBarPercPerElem = (perc /= (int.Parse(countFiles)));
foreach (DataBaseUpdateFiles filesSql in dataBaseUpdateFilesCollection1)
{
}
My problem is here. It is always passing in the first element of the listview, and I want it to scroll through all those that are selected. for (int i = 0; i