Solved

vb.net 2008 sort datagridview

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

Expert Comment

by:Ryan Chong
Comment Utility
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
Comment Utility
0
 
LVL 48

Accepted Solution

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

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

743 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now