Home - Forums-.NET - FlyGrid.Net (Windows Forms) - Sorting in runtime v 1.2

FlyGrid.Net (Windows Forms)

.NET Datagrid - Fast, highly customizable, industry standards .NET data grid control for WinForms

This forum related to following products: FlyGrid.Net

Sorting in runtime v 1.2
Link Posted: 21-Dec-2005 07:51
Please embrace addition of columns into FlyGrid.BeginInit/EndInit methods:

tabela.BeginInit();
try
{
  UCTabela.DodajKolumneTabeli(tabela, "data", "Data", "Data naprawy", false, NineRays.Windows.Forms.Grids.ColumnFitMode.SmartFit, ContentAlignment.MiddleCenter , SortOrder.None, NineRays.Windows.Forms.Data.SummaryKind.None, true );

  UCTabela.DodajKolumneTabeli(tabela, "nrzlec", "Numer zlec.", "Numer zlecenia", false, NineRays.Windows.Forms.Grids.ColumnFitMode.SmartFit, ContentAlignment.MiddleCenter , SortOrder.Descending, NineRays.Windows.Forms.Data.SummaryKind.None, true );

  UCTabela.DodajKolumneTabeli(tabela, "stan_km", "Przebieg", "Przebieg licznika", false, NineRays.Windows.Forms.Grids.ColumnFitMode.SmartFit, ContentAlignment.MiddleCenter , SortOrder.None, NineRays.Windows.Forms.Data.SummaryKind.None, true );

  UCTabela.DodajKolumneTabeli(tabela, "rd", "Wykonawca", "Wykonawca F-firma naprawcza, W-warsztat", false, NineRays.Windows.Forms.Grids.ColumnFitMode.FitToCaption, ContentAlignment.MiddleCenter , SortOrder.None, NineRays.Windows.Forms.Data.SummaryKind.None, true );
}
finally
{
  tabela.EndInit();
}
Link Posted: 27-Dec-2005 07:08
Are You tested my example  

Bug in component:

When You first create column and parameters and in second step add this column to table, sorting not work.

If you first add new column to table and in second step set parameters everythink is correct.