PC Review


Reply
Thread Tools Rate Thread

asp.net GridView Sorting

 
 
Guest
Posts: n/a
 
      23rd Oct 2008
Hi,

I have GridView:
<asp:GridView ID="gv" runat="server" AutoGenerateColumns="False"
AllowSorting="True" onsorting="gv_Sorting" ><Columns>
<asp:BoundField DataField="Id" HeaderText="Id" SortExpression="id" />
<asp:BoundField DataField="Name" HeaderText="Name" SortExpression="name"
/></Columns>
</asp:GridView>

I can sort by colums. But I would like user to see which column is curent
sorted by and if it is ASC or DESC.
Have do I do it by hand in onsorting event ? (change cell style, and arrow
gif)

Thanks for help

 
Reply With Quote
 
 
 
 
Lee
Guest
Posts: n/a
 
      24th Oct 2008
On Oct 23, 3:00*pm, <ambroz...@poczta.onet.pl> wrote:
> Hi,
>
> I have GridView:
> <asp:GridView ID="gv" runat="server" AutoGenerateColumns="False"
> AllowSorting="True" onsorting="gv_Sorting" *><Columns>
> * * <asp:BoundField DataField="Id" HeaderText="Id" SortExpression="id" />
> * * <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="name"
> /></Columns>
> </asp:GridView>
>
> I can sort by colums. But I would like user to see which column is curent
> sorted by and if it is ASC or DESC.
> Have do I do it by hand in onsorting event ? (change cell style, and arrow
> gif)
>
> Thanks for help


A great article detailing exactly how to do this is on CodeProject:
http://www.codeproject.com/KB/aspnet...ng_Paging.aspx

L. Lee Saunders
oldschooldotnet.blogspot.com
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sorting GridView? George Microsoft ASP .NET 0 16th Sep 2008 04:12 PM
gridview sorting =?Utf-8?B?YmJkb2J1ZGR5?= Microsoft C# .NET 3 14th Jun 2007 03:56 PM
Sorting in Gridview =?Utf-8?B?QmVydA==?= Microsoft ASP .NET 1 31st Jan 2007 07:33 AM
Sorting Gridview Will Microsoft ASP .NET 1 15th Jan 2007 06:20 PM
Sorting on a Gridview Cindy Lee Microsoft C# .NET 5 10th Jan 2007 08:14 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:32 AM.