Home Forums WinForms controls Xceed Grid for WinForms Binding to NHibernate Entities Reply To: Binding to NHibernate Entities

User (Old forums)
Member
Post count: 23064

Alright.

I’ve gone the route of programatically creating DataBoundColumn objects.  Something like this:

		PaymentsGrid.AutoCreateColumns = False
With PaymentsGrid.Columns
.Clear()
.Add(New DataBoundColumn("EffDate") With {.Fixed = True, .Title = "Eff", .FormatSpecifier = "d"})
.Add(New DataBoundColumn("Payment") With {.Title = "Payment $"})
.Add(New DataBoundColumn("InvoiceDate") With {.Title = "Invoice", .FormatSpecifier = "d"})
.Add(New DataBoundColumn("Description") With {.Title = "Description"})
End With

But unless I bind data to the grid, none of the columns are displayed.

How can I show the columns in the empty grid?

Imported from legacy forums. Posted by Dan (had 1744 views)