Hi Crono,
The BestFitColumns method does the trick for the BandedGridView. As for the AdvBandedGridView, its layout may be too complex. So, there is no way to calculate the best width of columns in a common scenario.
Updated by Maxim (DevExpress Support)
It is possible to simulate this feature manually for the BandedGridView. Call the BestFit method for all columns related to the current band.
The following code illustrates how to do this:
C#private void BestFil(GridBand gridBand)
{
gridBand.View.BeginUpdate();
foreach (BandedGridColumn column in gridBand.Columns)
{
column.BestFit();
}
gridBand.View.EndUpdate();
}
Visual BasicPrivate Sub BestFil(ByVal gridBand As GridBand)
gridBand.View.BeginUpdate()
For Each column As BandedGridColumn In gridBand.Columns
column.BestFit()
Next column
gridBand.View.EndUpdate()
End Sub
I hope you find this approach useful.
Wow… seven years… guess there's no point expecting it anymore now!