Home Forums WinForms controls Xceed Grid for WinForms getfittedwidth-method for unbound detailgrids Reply To: getfittedwidth-method for unbound detailgrids

User (Old forums)
Member
Post count: 23064

Hello AndreC
thanks for your answer!

What is the right syntax to get the created detailgrid, not the template?
Here is my code to add the detailgrid to GridControl1:

detail = New Detailgrid
…(adding columns, stylesheets)…
Me.GridControl1.DetailGridTemplates.Add(detail)

GridControl1.EndInit()

…- after filling the cells with contents, at last this sub is called:
call GridColumnwidth(detail)

Private Sub GridColumnwidth(ByVal obj As DetailGrid)
Dim column As Column
For Each column In obj.Columns
column.Width = column.GetFittedWidth()
Next column
End Sub

Do you know what is wrong?

thanks
VUser

Imported from legacy forums. Posted by VUser (had 405 views)