Solved

vb.net 2008 sort datagridview

Posted on 2009-04-07
3
677 Views
Last Modified: 2013-11-26
Guys,

How to sort data in datagridview by click on the datagridview header.
0
Comment
Question by:aarontham
3 Comments
 
LVL 50

Expert Comment

by:Ryan Chong
ID: 24094289
try like:

<asp:GridView ID="GridView1" runat="server"
                                            AllowSorting="True"

...>

then in the columns:

<asp:BoundField DataField="category" HeaderText="Category"
                                                    SortExpression="category" />
                                                <asp:BoundField DataField="item" HeaderText="Item Name"
                                                    SortExpression="item" />
0
 
LVL 53

Expert Comment

by:Dhaest
ID: 24094320
0
 
LVL 48

Accepted Solution

by:
jpaulino earned 500 total points
ID: 24094497
I don't understand the question because datagridview does that by default.
Can you clarify ?
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question