You need to teach the datagrid how to format a Dział for display
purposes. By default it use ToString() which in turn by default
returns the class name. Either override ToString(), or I believe you
can add some formatter callback to the datagrid. The latter may be a
better option if it's not logical for ToString() to return the text
required for the grid.

Another option is to manually transform your data to a view model, and
then using the view model with the data grid.

/Oskar


Den 27 mars 2012 22:19 skrev beginnerFNH <[email protected]>:
> Ok I have handled that: Dział = ((Dział)comboBox1.SelectedItem)
>
> I got another question:
> I would like to retrive all data from Osoba table so i did:
>
> IList<Osoba> osoby = dbSession.Linq<Osoba>().ToList<Osoba>();
> dgvPersons.DataSource = osoby;
>
> I have retreived all information correctly like Name, Adress but there
> is foreign key of Dzial (department) - digits
>
> and i retreving in datagridcells always same informations for all
> persons:
> hms.core.Entites.Dział
>
> --
> You received this message because you are subscribed to the Google Groups 
> "nhusers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/nhusers?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to