473,414 Members | 1,843 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Sort Gridview by columns

I have a working ASP.NET 2.0 application that uses a GridView control. How
can I enable the feature that allows a user to click on a column heading and
sort the contents by the information in that column?

Thanks,

Keith
Aug 22 '06 #1
1 1427
Hi Keith,

Your problem is probably more complex than this, but for starters... When
you set the GridView's allowsorting property to True, does sorting come on?

<asp:gridview id="GridView1" runat="server" allowsorting="True">

Could you show us the code that isn't working?

Ken
Microsoft MVP [ASP.NET]

"keithb" <kb******@dslextreme.comwrote in message
news:ef**************@TK2MSFTNGP05.phx.gbl...
>I have a working ASP.NET 2.0 application that uses a GridView control. How
can I enable the feature that allows a user to click on a column heading
and sort the contents by the information in that column?

Thanks,

Keith

Aug 23 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Thirsty Traveler | last post by:
I have a gridview where the datasource is bound after a selection. The result of doing this is that sorting and paging do not work. I was given a sample of how to resolve this, however my attempt...
4
by: CSharpguy | last post by:
I have a grid on my webform with 10 columns, I need to allow the user to sort the columns when they click on the header. My grid is populated byt a dataset and not any typed datasets,...
0
by: rmgalante | last post by:
Hi, I've been experimenting with the ASP.Net GridView and encountered some interesting issues that I thought I would share. I have a page that loads a GridView with a generic collection of...
0
by: GMartin | last post by:
I have a pop-up form with a three columned Grid that has checkboxes in a Template Column in the first/left-most column. (The form is to allow users to select "Members" of a group, where they check...
3
by: bbawa1 | last post by:
I have a Grid View and I want to sort the data in Gridview by clicking on column. How can I do that.
0
by: Steve | last post by:
I have gridview that as a template field. I have all columns in the gridView sortable. The issue I'm facing is when I click on the Template field header to sort, I have to click it twice for it to...
3
by: Peter | last post by:
I have a GridView which is populated by List<ofObjects> Does anyone have example of how to sort the columns of this GridView? I have found examples without DataSourceControl but these use...
2
by: Ralf | last post by:
I have a custome request to print a gridview with lots of columns, 31 to be exact. I know how to print out a gridview, done it already for a GV with 6 columns. But, this GV is very wide and will...
0
by: cmrhema | last post by:
Hi, I have a gridview problem while binding more than two gridviews. I am giving a sample scenario of what I have done so far I have two tables First table: Department , having columns...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.