Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Disable sorting on specific column GridView
Message
From
23/02/2007 10:56:54
 
 
To
12/02/2007 07:50:11
Alexandre Palma
Harms Software, Inc.
Alverca, Portugal
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01189687
Message ID:
01198324
Views:
11
Thanks for the reply. Alas, it seems that there is no access to the autogenerated cols. the docs talk about columns.count being zero with autogenerate columns on. My belief is I can not do what I want without actually generating the columns. :(

Joe

>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,
~Joe Johnston USA

"If ye love wealth better than liberty, the tranquility of servitude better than the animated contest of freedom, go home from us in peace. We ask not your counsel or arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that ye were our countrymen."
~Samuel Adams

Previous
Reply
Map
View

Click here to load this message in the networking platform