The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I know the column and the listsortdirection before I refresh the data in the grid, but the column only sorts ascending even when I tag it like the code below. If _SortType = 0 Then Me.dgSales(0, _SortCol).Tag = ListSortDirection.Ascending Else Me.dgSales(0, _SortCol).Tag = ListSortDirection.Descending End If dgSales.SortColumn(_SortCol). I'm using Public WithEvents dgSales As GridHierDataBoundGrid as my grid.
ADAdministrator Syncfusion Team November 28, 2006 04:58 AM UTC
Hi Prumery,
In DataBoundGrid, you can set these tag properties only through the Model.QueryCellInfo event handler. One way you can acheive this would be to set a flag in the your sort module and check this flag in order to enable the sorting icon for the header cell in the Model.QueryCellInfo.
//Or
You can use the DefaultView.Sort property of the underlying datasource in a grid to control the sort direction. Here is a code snippet to show this
DataTable dt = this.gridDataBoundGrid1.DataSource as DataTable;