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.
Hi,
I am using GridDataBoundGrid ver 2.1.0.9. I have a number of columns in my grid which are ''sortable''. Right now, if underlying DataSource (which is DataTable) is refreshed , grid is sorted by default column (which is the first column) instead of being sorted by column which was the ''sort'' column before refresh. If custom programming is required to achieve what i am trying to do, then how do i keep track of current column that is being used for sorting ? I guess, i can override SortbyColumn method and save colIndex argument .. is there is a more direct approach avaialable ?
thanks
ADAdministrator Syncfusion Team June 20, 2005 08:49 AM UTC
You can save the Sort property on teh DataView associated with the datasource before you refresh, an dthen reset this property after you refresh.
CurrencyManager cm = this.grid.BindingContext[this.grid.DataSource, this.grid.Daatmember] as CurrencyManager;
DataView dv = cm.List as DataView;
string saveSort = dv.Sort;
// do your refresh
dv.Sort = saveSort;
ADAdministrator Syncfusion Team June 20, 2005 06:15 PM UTC
thanks !!! this will help ...
>You can save the Sort property on teh DataView associated with the datasource before you refresh, an dthen reset this property after you refresh.
>
>CurrencyManager cm = this.grid.BindingContext[this.grid.DataSource, this.grid.Daatmember] as CurrencyManager;
>DataView dv = cm.List as DataView;
>string saveSort = dv.Sort;
>
>// do your refresh
>
>dv.Sort = saveSort;
>
>