Home Forums WinForms controls Xceed Grid for WinForms Problem with databinding !! Reply To: Problem with databinding !!

User (Old forums)
Member
Post count: 23064

This seems to work perfectly for a GridControl, though I am not sure quite why this is necessary. INcidentally, if you break to debug after setting the binding and wait about 10 seconds, the columns magically appear!

However, I am having the same issue with a DetailGrid, which in and of itself does not have a BindingContext property. Trying:

Dim TransactionSummaryGrid As New Xceed.Grid.GridControl
Dim TransactionDetailGrid As New Xceed.Grid.DetailGrid
TransactionSummaryGrid.BeginInit()
TransactionSummaryGrid.HeaderRows.Add(New Xceed.Grid.ColumnManagerRow)
TransactionSummaryGrid.DataSource = Swag
TransactionSummaryGrid.DataMember = “Account”
TransactionSummaryGrid.DetailGridTemplates.Add(TransactionDetailGrid)
TransactionDetailGrid.DataSource = Nothing
TransactionDetailGrid.DataMember = “AccountTransactions”
TransactionDetailGrid.HeaderRows.Add(New Xceed.Grid.ColumnManagerRow)

TransactionDetailGrid.GridControl.BindingContext = New BindingContext
TransactionSummaryGrid.BindingContext = New BindingContext

Doesn’t do it – any thoughts?

The documentation for this grid is quite weak, it’s a bit frustating dealing with it.

Imported from legacy forums. Posted by JimIdle (had 312 views)