Bug SourceGrid.Cells.Views.ColumnHeader.ElementSort.SortStyle

May 11, 2009 at 7:48 PM
Edited May 11, 2009 at 7:53 PM

How can i create a table with no sort?

I have the next code....

SourceGrid.Cells.Views.ColumnHeader sorteableHeader = new SourceGrid.Cells.Views.ColumnHeader();

sorteableHeader.Font = new Font(this.historicGrid.Font, FontStyle.Bold);

sorteableHeader.ElementSort.SortStyle = DevAge.Drawing.HeaderSortStyle.None;

this.historicGrid.ColumnsCount = fields.Count;

this.historicGrid.Rows.Insert(0);

 

foreach (Item field in fields) {

this.historicGrid[0, i] = new SourceGrid.Cells.ColumnHeader(field.Name);

this.historicGrid[0, i].Tag = field.Id;

this.historicGrid[0, i].View = sorteableHeader;

_columnIndex.Add(field.Id, i); i++; #endregion

}

 

I compile and run the program. Click a column header and the rows are sorted    :(

May 11, 2009 at 10:08 PM

you have to remove sort controller

sortableHeader.RemoveController(sortableHeader.FindController(typeof(Controllers.SortableHeader));

I did not test it but if I remember correctly it shoud do the job

May 12, 2009 at 3:45 PM

It works well !!!

 

Thanks very much