Solved

vb.net 2008 sort datagridview

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

How to sort data in datagridview by click on the datagridview header.
0
Comment
Question by:aarontham
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 51

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

740 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