c# - fluent nhibernate ... mapping 'lookup' value to DataGrid -


To simplify it, as much as I can think, if I have classes:

order, order Type, where there are 1 to 1 relationships with an order type in an order, how can I bind into a datagrid, and see the desired column / field from the order type?

When I have a datagrid, in order. Order type 'field', I get the name of the order type class with just one guide. I should be able to say something like 'use the' code 'field from the order type class.

This is not really a nineteen question, because this problem can come with any object, Even though how does it last? I think you are asking that you want to make a list of orders in the grid, and you want to bind the property of another property which is a class.

  & asp: Gridview id = "gv1" runat = "server" & gt; & Lt; Columns & gt; & Lt ;! - Regular property - & gt; & Lt; ASP: BoundfieldDefined = "ID" header text = "ID" /> & Lt; ASP: Boundfield datedfield = "created" header text = "date place" /> & Lt ;! - Property of a property - & gt; & Lt; Asp: TemplateField Header Text = "Order Code" & gt; & Lt; ItemTemplate & gt; & Lt; ASP: label text = '& lt;% # ((order) container.datetime) .Order type Code% & gt; Runat = "server" /> & Lt; / ItemTemplate & gt; & Lt; / ASP: TemplateField & gt; & Lt; / Column & gt; & Lt; / ASP: GridView & gt;  

Hope that helps.

For WinForms,


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -