I have two listbox, one show root folders, and one show child folders of each root folder when navigating between these root folders
If at one root folder, inside it has no child folders then enable createFolderBtn
and vice versa, here is my code
I have rootLst datasource is results of folder with folder's name contains search word.
tested some but the createFolderBtn is disabled always although childLst contains nothing
Could you help me with that, thanks !!!
If at one root folder, inside it has no child folders then enable createFolderBtn
and vice versa, here is my code
VB.NET:
Private Sub rootLst_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles rootLst.SelectedIndexChanged
Dim di As New IO.DirectoryInfo("E:\" + rootLst.SelectedItem.ToString)
Dim dirs As DirectoryInfo() = di.GetDirectories("*" & childName & "*", SearchOption.TopDirectoryOnly)
childLst.DataSource = dirs
If dirs Is Nothing Then
createFolderBtn.Enabled = True
Else
createFolderBtn.Enabled = False
End If
End Sub
tested some but the createFolderBtn is disabled always although childLst contains nothing
Could you help me with that, thanks !!!