Click here to Skip to main content
15,902,198 members
Home / Discussions / C#
   

C#

 
QuestionLit the Num, Caps and Scroll lock light? Pin
Mc_Topaz28-Aug-09 1:59
Mc_Topaz28-Aug-09 1:59 
AnswerRe: Lit the Num, Caps and Scroll lock light? Pin
Keith Barrow28-Aug-09 2:14
professionalKeith Barrow28-Aug-09 2:14 
GeneralRe: Lit the Num, Caps and Scroll lock light? Pin
Mc_Topaz28-Aug-09 4:37
Mc_Topaz28-Aug-09 4:37 
AnswerRe: Lit the Num, Caps and Scroll lock light? Pin
DaveyM6928-Aug-09 2:18
professionalDaveyM6928-Aug-09 2:18 
AnswerRe: Lit the Num, Caps and Scroll lock light? Pin
DaveyM6930-Aug-09 22:21
professionalDaveyM6930-Aug-09 22:21 
GeneralRe: Lit the Num, Caps and Scroll lock light? Pin
Mc_Topaz31-Aug-09 5:06
Mc_Topaz31-Aug-09 5:06 
GeneralRe: Lit the Num, Caps and Scroll lock light? Pin
DaveyM6931-Aug-09 8:53
professionalDaveyM6931-Aug-09 8:53 
QuestionThreads Pin
jpk42028-Aug-09 0:33
jpk42028-Aug-09 0:33 
Hello All ,

I have requirement that User will have list of Directories . the moment user selects a Directory
Thread s hould be started and It s hould display List of Txt files name and dates in Grid .

User can change the directory and the thread should show the files of that directory in grid

I have done the code like this


public static DataTable GetFilesinDirectory()
{
DriveInfo Drive = new DriveInfo(strDriveName);

DirectoryInfo[] DirectoryList =Drive.RootDirectory.GetDirectories(strDirectoryName);


DtFilesList.Rows.Clear();
// DtFilesList.AcceptChanges();
FileInfo[] FilesList = DirectoryList[0].GetFiles("*.txt");

foreach(FileInfo ObjInfo in FilesList)
{
DataRow drFileInfo = DtFilesList.NewRow();

drFileInfo["Name"]=ObjInfo.Name;
drFileInfo["CreationTime"]=ObjInfo.CreationTime;
drFileInfo["Extension"]=ObjInfo.Extension;
drFileInfo["LastWriteTime"]=ObjInfo.LastWriteTime;

DtFilesList.Rows.Add(drFileInfo);
}
return DtFilesList;

}

This method is assigned to thread

strDirectoryName will be updated once user selects the Directory

But problem is Since it is Static method I cant acces the Grid then how should i Bind ?
AnswerRe: Threads Pin
Luc Pattyn28-Aug-09 0:48
sitebuilderLuc Pattyn28-Aug-09 0:48 
GeneralRe: Threads Pin
jpk42028-Aug-09 1:34
jpk42028-Aug-09 1:34 
GeneralRe: Threads Pin
Luc Pattyn28-Aug-09 1:41
sitebuilderLuc Pattyn28-Aug-09 1:41 
GeneralRe: Threads Pin
jpk42028-Aug-09 1:46
jpk42028-Aug-09 1:46 
GeneralRe: Threads Pin
Luc Pattyn28-Aug-09 1:50
sitebuilderLuc Pattyn28-Aug-09 1:50 
GeneralRe: Threads Pin
OriginalGriff28-Aug-09 5:17
mveOriginalGriff28-Aug-09 5:17 
GeneralRe: Threads Pin
Luc Pattyn28-Aug-09 5:57
sitebuilderLuc Pattyn28-Aug-09 5:57 
Questionobject typeconversion syntax error Pin
myinstincts28-Aug-09 0:29
myinstincts28-Aug-09 0:29 
AnswerRe: object typeconversion syntax error Pin
stancrm28-Aug-09 0:31
stancrm28-Aug-09 0:31 
AnswerRe: object typeconversion syntax error Pin
Keith Barrow28-Aug-09 0:46
professionalKeith Barrow28-Aug-09 0:46 
QuestionNeed BHO Solutions Pin
Jacobb Michael27-Aug-09 23:49
Jacobb Michael27-Aug-09 23:49 
QuestionHow to Accept password in ** format during installation. Pin
RA|-|UL PATEL27-Aug-09 21:56
RA|-|UL PATEL27-Aug-09 21:56 
AnswerRe: How to Accept password in ** format during installation. Pin
OriginalGriff27-Aug-09 22:02
mveOriginalGriff27-Aug-09 22:02 
GeneralRe: How to Accept password in ** format during installation. Pin
RA|-|UL PATEL27-Aug-09 23:04
RA|-|UL PATEL27-Aug-09 23:04 
GeneralRe: How to Accept password in ** format during installation. Pin
OriginalGriff27-Aug-09 23:46
mveOriginalGriff27-Aug-09 23:46 
GeneralRe: How to Accept password in ** format during installation. Pin
Manas Bhardwaj28-Aug-09 0:31
professionalManas Bhardwaj28-Aug-09 0:31 
QuestionCannot perform '=' operation on System.Char and System.Boolean. exception Pin
acroitoriu27-Aug-09 21:41
acroitoriu27-Aug-09 21:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.