Trouble with FileInfo wildcards

Results 1 to 2 of 2

Thread: Trouble with FileInfo wildcards

  1. #1
    Join Date
    Dec 1969

    Default Trouble with FileInfo wildcards

    I have a datagrid that I would like to load with log file and I am using the following code:<BR><BR>DirectoryInfo di = new DirectoryInfo(mypath);<BR> <BR><BR>FileInfo[] fiArrLog = di.GetFiles("*" + fileDate.ToString("yyyyMMdd") + "*.log");<BR><BR>FileInfo[] fiArrReg = di.GetFiles("*" + fileDate.ToString("yyyyMMdd") + "*.rej");<BR><BR><BR>How can I bind "Both" of these arrays to my datagrid? I need to display file with a .reg and .log. The code above retrieve the correct files, I don&#039;t see how to bind both arrays to my datagrid.<BR><BR>Thanks for the help.

  2. #2
    Join Date
    Dec 1969

    Default loop through both the arrays

    and create rows on a DataTable.. then bind the DataTable to the DataGrid<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts