Sorry i did not explain properly
I am using the following code to bind a list of files to a datagrid but if
there are no folder of files the datagrid dissapears, i want a way to
check for files or folder before i bind the gird.
e.g
check for folder
if not folders, do nothing, if folders exist bind datagrid
System.IO.Direc toryInfo dicases1=new
System.IO.Direc toryInfo("C:\\S hearings\\" + jon + "\\" + folder);
DataGrid3.DataS ource = dicases1.GetFil es();
DataGrid3.DataB ind();
"Eliyahu Goldin" <re************ *@monarchmed.co m> wrote in message
news:%2******** *******@TK2MSFT NGP11.phx.gbl.. .
didocs1.GetFile s ();
didocs1.GetDire ctories ();
Not sure about security issues.
Eliyahu
"Jonathan Dixon" <jo**@ukonline. co.uk> wrote in message
news:uR******** ******@TK2MSFTN GP10.phx.gbl... I am using this code to get a list of folders and files
System.IO.Direc toryInfo didocs1=new
System.IO.Direc toryInfo("C:\\S hearings\\" + jonn + "\\" + folder);
I was wondering if there was a way to determine if the the folder had
any files or subfolders within it or whether it is empty
Thanks
Jon