Solved

vb.net 2008 sort datagridview

Posted on 2009-04-07
3
679 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

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

Question has a verified solution.

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

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

839 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