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: 13-Sep-2005 22:08
Hi

When in create columns in runtime and one of this have parameter SortOrder = SortOrder.Ascending ( another have set to SortOrder.None ), after set dataSource by SetDataBinding, data in table ar not sorted, but marker on collumn is set correctly.

There is a bug ?
Link Posted: 14-Sep-2005 12:20
Please download latest FlyGrid.Net (1.2.2), this problem is solved in this version.
Link Posted: 25-Sep-2005 20:48
Hi

I have version 1.2.3 and this poblem is no solved !!!
Link Posted: 26-Sep-2005 04:58
It is very strange - you can try the Fastest DataBinding - first column is set to Descending sort oder and data is sorted correctly.
Could you provide us with an example code to show problem?
Link Posted: 27-Sep-2005 02:16
Hi

My code:

Function for add columns:

public static void DodajKolumneTabeli( NineRays.Windows.Forms.FlyGrid tabela, string nazwaPola, string naglowek, string tip, bool zapis, NineRays.Windows.Forms.Grids.ColumnFitMode wypelnianie, ContentAlignment wyrownanie, SortOrder sortowanie, NineRays.Windows.Forms.Data.SummaryKind podsumowanie, bool widoczna )
    {
      NineRays.Windows.Forms.Grids.Column kolumna = new NineRays.Windows.Forms.Grids.Column();
      kolumna.Width = 150;
      kolumna.Visible = widoczna;
      kolumna.FieldName = nazwaPola.ToUpper();
      kolumna.Caption = naglowek;
      kolumna.TooltipText = tip;
      kolumna.ReadOnly = !zapis;
      kolumna.FitMode = wypelnianie;
      kolumna.TextAlign = wyrownanie;
      kolumna.AllowSorting = true;
      if ( SortOrder.None != sortowanie )
        kolumna.CellBackColor = Color.Orange;
      kolumna.SortOrder = sortowanie;
      kolumna.Summaries = podsumowanie;
      tabela.Columns.Items.Add(kolumna);
    }


Calling function:

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 );

DataSet binding:

tabela.Rows.SetDataBinding(this.Ds,this.Ds.Tables[0].TableName);

Best regards
Robert
Link Posted: 27-Sep-2005 10:25
Yes, we've found incorrecntess - please check the new version of FlyGrid.Net new version for downloading (coming sooner).
Link Posted: 02-Dec-2005 05:58
I have version 1.2.8 and this poblem is still no solved !!!
Link Posted: 07-Dec-2005 04:16
Have you intention to solve this bug.

Robert
Link Posted: 07-Dec-2005 22:56
This problem is solved in the latest version (1.2.9), open Master/Detail sample to see that first two columns is sorted in all levels of FlyGrid (nested also)
Link Posted: 20-Dec-2005 21:52
Still not work !!!!  

FlyGrid version 1.2.11

In sort column are text values

My example is still actual

Robert