Last post Jul 24, 2009 10:30 AM by prasadP
Jul 23, 2009 08:37 PM|avikumar|LINK
I am using grid, it works correctly only thing that I want that first column should be sorted automatically.
Here is my code for grid setting
oGrid.DataSource = _dv;
oGrid.AutoGenerateColumns = false;
oGrid.AllowPaging = true;
oGrid.AllowSorting = true;
oGrid.Sorting += new GridViewSortEventHandler(this.oGrid_Sorting);
oGrid.PageSize = 10;
oGrid.PagerSettings.Mode = PagerButtons.NumericFirstLast;
oGrid.HeaderStyle.HorizontalAlign = HorizontalAlign.Center;
Jul 24, 2009 10:30 AM|prasadP|LINK
Before adssigning source first sort the view on first column and then assign as a source to grid.
use _dv.sort method for first column.