Hi,
I am using the last NHibernate CVS-head and have the following problem:
I have got a list of tasks and every task is linked to a user. I have a gridview that lists all the tasks I have and also shows the username of the linked user.
Editing also works for the task's properties except of the user. The user looks something like that:
Code:
public class AMSUser
{
public Guid UserId{ get; set; }
public string UserName {get; set; }
public string Address {get; set; }
}
A task is like that:
Code:
public class Task : DomainBase
{
public string Description { get; set; }
public string Title {get; set;}
public AMSUser AMSUser {get; set; }
}
I have DataAccess-classes that return Lists of Users and Tasks and all this stuff works well. But how to add a dropdownlist to the gridview to choose the task's user?
I think these kind of "Lookup-Dropdownlists" occur in every application, so there must be examples how to implement it best. I think I could add a new property UserId to class Task and in the set property setter change the user, but probably there is a better way for doing it.
I hope anybody can help :-)
Regards,
Dominik