We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Not able to get sort icon in Virtual Grid.

Thread ID:

Created:

Updated:

Platform:

Replies:

68677 Sep 27,2007 05:16 AM UTC Sep 28,2007 03:07 AM UTC WinForms 1
loading
Tags: GridControl
Yeshwant Raut
Asked On September 27, 2007 05:16 AM UTC

Hi I added the code provided in help.

this.gridControl1.CellModels.Add("SortHeader", new GridSortColumnHeaderCellModel(this.gridControl1.Model));

this.gridControl1[0,1].CellType = "SortHeader";

this.gridControl1[0,1].Tag = ListSortDirection.Ascending;

But still i am not able to get sort icon in header columns.

let me know what i am missing

Jisha Joy [Syncfusion]
Replied On September 28, 2007 03:07 AM UTC

Hi Yeshwant,

Thank you for your interest in Syncfusion Products.

It is possible to get sort icon in header columns by inheriting the GridControl and overriding OnMouseDown event in VirtualGrid.
Here is the code snippets:

//add a sort header to the CellModels.
this.CellModels.Add("ColumnHeaderCell", new GridSortColumnHeaderCellModel(this.Model));
//overriding the OnMouseDown event.
protected override void OnMouseDown(MouseEventArgs e)
{ ................
................
this[0, col].CellType = "ColumnHeaderCell";
if(this[0, col].HasTag)
{
if((ListSortDirection) this[0, col].Tag == ListSortDirection.Ascending)
this[0, col].Tag = ListSortDirection.Descending;
else
this[0, col].Tag = ListSortDirection.Ascending;
}
..................
}

Please refer the following sample that illustrates the same:
http://websamples.syncfusion.com/samples/Grid.Windows/37765/main.htm

Please try this and let me know if you have any questions.

Regards,
Jisha

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;