How can I set Listviewitem is Checked True/False with AddRange function?
Try
_lsv.SuspendLayout()
_lsv.Items.AddRange((From itm In _desrz.Select(
Function(x) New ListViewItem(New String() {
x.FolderName,
x.FolderPath}
))).ToArray)
Catch ex As Exception
Throw ex
Finally
_lsv.ResumeLayout() : _lsv.Update() : _lsv.Refresh()
End Try
_desrz is a Folder object with 3 properties: FolderPath
, FolderName
, and FolderChecked
. I can add FolderPath
and FolderName
to the listview, but I could not set the check property value is true/false?