Joe sorry just to respond now but I was away.
You can also use the sorting event to determin if it should be sort or not and if not then just set the GridViewSortEventArgs.Cancel to true, that will cancel the sort, note that this should be done in the sorting event and not the sorted since the sorting event occurs before the grid performs the sort and is when u can cancel that sort.
>Hi Alexandre, that would make the entire grid unsortble. :( I have to disable the cols sortable property at run time. Also, as these are autogenerated cols I dont have the luxury of creating bound cols in advance. :(
>
>Joe
>
>>Hi Joe just put the AllowSorting property of the grid view to False.
>>
>>
>>>Hello World,
>>> I need to be able to disable sorting on a GridView that has auto generated fields. I never know what the fields will be in advance. :) At the very end of the pageload event gv.Columns.Count is always 0 even when in the middle of paging. Any help would be most appreciated.
>>>
>>>My humble thanks in advance,
Alexandre Palma
Senior Application Architect