Click here to Skip to main content
15,911,035 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to seperate the Two string? Pin
Malcolm Smart26-Jul-07 21:08
Malcolm Smart26-Jul-07 21:08 
GeneralRe: How to seperate the Two string? Pin
Eliz.k26-Jul-07 22:38
Eliz.k26-Jul-07 22:38 
QuestionBest way to populate grid? [modified] Pin
zaboboa26-Jul-07 10:22
zaboboa26-Jul-07 10:22 
AnswerRe: Best way to populate grid? Pin
Judah Gabriel Himango26-Jul-07 12:56
sponsorJudah Gabriel Himango26-Jul-07 12:56 
AnswerRe: Best way to populate grid? Pin
Eliz.k26-Jul-07 20:55
Eliz.k26-Jul-07 20:55 
AnswerRe: Best way to populate grid? Pin
Urs Enzler26-Jul-07 20:56
Urs Enzler26-Jul-07 20:56 
GeneralRe: Best way to populate grid? Pin
zaboboa27-Jul-07 11:57
zaboboa27-Jul-07 11:57 
GeneralRe: Best way to populate grid? Pin
Urs Enzler28-Jul-07 4:48
Urs Enzler28-Jul-07 4:48 
QuestionHow to get a foreign key lookup value in datagridview Pin
xdavidx26-Jul-07 10:13
xdavidx26-Jul-07 10:13 
QuestionC# to Mono Pin
Sean G. Murphy26-Jul-07 10:08
Sean G. Murphy26-Jul-07 10:08 
AnswerRe: C# to Mono Pin
Dan Neely26-Jul-07 10:37
Dan Neely26-Jul-07 10:37 
AnswerRe: C# to Mono Pin
Judah Gabriel Himango26-Jul-07 10:38
sponsorJudah Gabriel Himango26-Jul-07 10:38 
GeneralRe: C# to Mono Pin
Amar Chaudhary26-Jul-07 14:41
Amar Chaudhary26-Jul-07 14:41 
QuestionTiming out a method [modified] Pin
martin_hughes26-Jul-07 8:46
martin_hughes26-Jul-07 8:46 
AnswerRe: Timing out a method Pin
Justin Perez26-Jul-07 8:57
Justin Perez26-Jul-07 8:57 
GeneralRe: Timing out a method Pin
martin_hughes26-Jul-07 9:15
martin_hughes26-Jul-07 9:15 
AnswerRe: Timing out a method Pin
Le centriste26-Jul-07 10:17
Le centriste26-Jul-07 10:17 
QuestionClass declaration inside loops Pin
rsaint2726-Jul-07 7:18
rsaint2726-Jul-07 7:18 
AnswerRe: Class declaration inside loops Pin
PhilDanger26-Jul-07 7:29
PhilDanger26-Jul-07 7:29 
GeneralRe: Class declaration inside loops Pin
rsaint2726-Jul-07 7:55
rsaint2726-Jul-07 7:55 
GeneralRe: Class declaration inside loops Pin
Paul Conrad26-Jul-07 8:26
professionalPaul Conrad26-Jul-07 8:26 
GeneralRe: Class declaration inside loops Pin
rsaint2726-Jul-07 10:40
rsaint2726-Jul-07 10:40 
AnswerRe: Class declaration inside loops Pin
Guffa26-Jul-07 11:05
Guffa26-Jul-07 11:05 
GeneralRe: Class declaration inside loops Pin
PhilDanger26-Jul-07 11:12
PhilDanger26-Jul-07 11:12 
QuestionDataGridView - Binding to an Object Pin
BigPMcCoy26-Jul-07 6:55
BigPMcCoy26-Jul-07 6:55 
I am trying to bind a DataGridView to a Collection that implaments IList<t>. The Entities in the collection contain properties that will be displayed as columns in the DataGridView. This all works fine.

One of the properties in the Entity is itself another Entity. I want the DataGridView to bind to a property of the nested Entity. How would I acomplish this?

Example Description:
I want to bind a DataGridView to the EmployeeCollection. The columns I want to display are EmpNumber, EmpName.LastName, EmpName.FirstName. I have tried setting the DataPropertyName on a column in the DataGridView to EmpName.FirstName and this does not work. I would like to solve this issue without exposing the properties to the Name Class in the Employee Class.

Example:
public class EmployeeCollection : List<employee>{

}

public class Employee{
public string EmpNumber { get; set; }
public Name EmpName{ get; set; }

}

public class Name{
public string FirstName { get; set; }
public string LastName { get; set; }

}

Thanks for your help.

Patrick McCoy

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.