How can I Allow Sorting in grid with type GridControl???

Hi,
how can I to allow sorting in my grid with type GridControl by clicking on the collumn titles????

I show in it data in such way:
//*******************************************
gridTypeSetSelector[0, 1].CellValue = "ID";
gridTypeSetSelector[0, 2].CellValue = "Select";
gridTypeSetSelector[0, 3].CellValue = "Convention Name";
gridTypeSetSelector[0, 4].CellValue = "Sql Expression";
gridTypeSetSelector.RowCount = 0;

foreach (DataRow row in dtConventionsForPreview.Rows)
{
this.gridTypeSetSelector.RowCount++;

this.gridTypeSetSelector[this.gridTypeSetSelector.RowCount, 1].CellValue = row[PduInstance.IdFieldName].ToString();
//if (_filteredObjects.Contains(obj))
// this.gridControl1[this.gridControl1.RowCount, 2].CellValue = "1";
this.gridTypeSetSelector[this.gridTypeSetSelector.RowCount, 3].CellValue = row["db_name"].ToString();
this.gridTypeSetSelector[this.gridTypeSetSelector.RowCount, 4].CellValue = row["sql_expression"].ToString();
//this.gridTypeSetSelector[this.gridControl1.RowCount, 0].Tag = obj;
}

Best regards, Alexander.

1 Reply

AD Administrator Syncfusion Team October 24, 2006 07:48 PM UTC

Hi Alexander,

Please refer to the GridControlSort sample in the Browser Samples shipped with the product, which will help you to do sorting for the gridcontrol.

C:\Program Files\Syncfusion\Essential Studio\4.2\Windows\Grid\Samples\Quick Start\GridControlSort sample

Thanks for using Syncfusion Products.
Regards,
Rajagopal

Loader.
Up arrow icon