Click here to Skip to main content
15,893,668 members
Home / Discussions / C#
   

C#

 
QuestionC#: Setup Project in VS2010 with Custom actions Pin
AshwiniSH25-Mar-14 21:07
professionalAshwiniSH25-Mar-14 21:07 
QuestionRe: C#: Setup Project in VS2010 with Custom actions Pin
Richard MacCutchan25-Mar-14 22:37
mveRichard MacCutchan25-Mar-14 22:37 
AnswerRe: C#: Setup Project in VS2010 with Custom actions Pin
AshwiniSH25-Mar-14 23:38
professionalAshwiniSH25-Mar-14 23:38 
GeneralRe: C#: Setup Project in VS2010 with Custom actions Pin
Richard MacCutchan25-Mar-14 23:41
mveRichard MacCutchan25-Mar-14 23:41 
GeneralRe: C#: Setup Project in VS2010 with Custom actions Pin
AshwiniSH27-Mar-14 0:20
professionalAshwiniSH27-Mar-14 0:20 
GeneralRe: C#: Setup Project in VS2010 with Custom actions Pin
Richard MacCutchan27-Mar-14 0:22
mveRichard MacCutchan27-Mar-14 0:22 
GeneralRe: C#: Setup Project in VS2010 with Custom actions Pin
AshwiniSH27-Mar-14 0:48
professionalAshwiniSH27-Mar-14 0:48 
GeneralRe: C#: Setup Project in VS2010 with Custom actions Pin
AshwiniSH4-Apr-14 0:03
professionalAshwiniSH4-Apr-14 0:03 
QuestionGenerics argument detect a class type Pin
Simon_Whale25-Mar-14 6:10
Simon_Whale25-Mar-14 6:10 
AnswerRe: Generics argument detect a class type Pin
OriginalGriff25-Mar-14 6:16
mveOriginalGriff25-Mar-14 6:16 
GeneralRe: Generics argument detect a class type Pin
Simon_Whale25-Mar-14 6:22
Simon_Whale25-Mar-14 6:22 
GeneralRe: Generics argument detect a class type Pin
OriginalGriff25-Mar-14 6:31
mveOriginalGriff25-Mar-14 6:31 
AnswerRe: Generics argument detect a class type PinPopular
Pete O'Hanlon25-Mar-14 7:47
mvePete O'Hanlon25-Mar-14 7:47 
GeneralRe: Generics argument detect a class type Pin
Simon_Whale25-Mar-14 9:44
Simon_Whale25-Mar-14 9:44 
GeneralRe: Generics argument detect a class type Pin
Pete O'Hanlon25-Mar-14 20:56
mvePete O'Hanlon25-Mar-14 20:56 
AnswerRe: Generics argument detect a class type Pin
Dave Kreskowiak25-Mar-14 9:07
mveDave Kreskowiak25-Mar-14 9:07 
GeneralRe: Generics argument detect a class type Pin
Simon_Whale25-Mar-14 10:12
Simon_Whale25-Mar-14 10:12 
QuestionHow can i set itextSharp PdfPTable column width Pin
devenv.exe25-Mar-14 1:11
professionaldevenv.exe25-Mar-14 1:11 
QuestionLoading SubFolders to DataGrid View - Please assist Pin
Mohan Subramani24-Mar-14 22:27
Mohan Subramani24-Mar-14 22:27 
AnswerRe: Loading SubFolders to DataGrid View - Please assist Pin
Pete O'Hanlon24-Mar-14 22:31
mvePete O'Hanlon24-Mar-14 22:31 
GeneralRe: Loading SubFolders to DataGrid View - Please assist Pin
Mohan Subramani25-Mar-14 0:34
Mohan Subramani25-Mar-14 0:34 
AnswerRe: Loading SubFolders to DataGrid View - Please assist Pin
Simon_Whale25-Mar-14 0:10
Simon_Whale25-Mar-14 0:10 
Below is some simple code that will get you started. This isn't the most flexible code that you can use but it should allow you to get started on the problem.

Personally I would build up a collection (Array, List or DataTable) and assign that as a data source.

Also it will only show the folders in the directory which you have specified and not each folders sub directory's.

C#
DataGridViewTextBoxColumn first = new DataGridViewTextBoxColumn();
first.Name = "Name";
first.HeaderText = "Name";

dataGridView1.Columns.Add(first);

DataGridViewTextBoxColumn second = new DataGridViewTextBoxColumn();
second.Name = "FullName";
second.HeaderText = "Full Path";

dataGridView1.Columns.Add(second);

DirectoryInfo dir = new DirectoryInfo(@"d:\documents");
foreach (DirectoryInfo subDir in dir.GetDirectories())
{
    dataGridView1.Rows.Add(new string[] { subDir.Name, subDir.FullName });
}

Every day, thousands of innocent plants are killed by vegetarians.

Help end the violence EAT BACON

QuestionWhere Is the Current Free Download Of Visual C# ? Pin
C-P-User-324-Mar-14 3:09
C-P-User-324-Mar-14 3:09 
AnswerRe: Where Is the Current Free Download Of Visual C# ? Pin
Pete O'Hanlon24-Mar-14 3:16
mvePete O'Hanlon24-Mar-14 3:16 
GeneralRe: Where Is the Current Free Download Of Visual C# ? Pin
C-P-User-324-Mar-14 3:18
C-P-User-324-Mar-14 3:18 

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.