473,563 Members | 2,667 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Grid View sort by column

I have a Grid View and I want to sort the data in Gridview by clicking
on column. How can I do that.

Apr 13 '07 #1
3 2008
On Apr 13, 12:04 pm, bba...@yahoo.co m wrote:
I have a Grid View and I want to sort the data in Gridview by clicking
on column. How can I do that.
Turn on "AllowSorti ng" property in the Gridview.

Apr 13 '07 #2
On Apr 13, 9:44 am, "Larry Bud" <larrybud2...@y ahoo.comwrote:
On Apr 13, 12:04 pm, bba...@yahoo.co m wrote:
I have a Grid View and I want to sort the data in Gridview by clicking
on column. How can I do that.

Turn on "AllowSorti ng" property in the Gridview.

I Turned on "AllowSorti ng" property in the Gridview. but it's not
working and columns headers are not clicakble.

Apr 13 '07 #3
bpd
On Apr 13, 1:59 pm, bba...@yahoo.co m wrote:
On Apr 13, 9:44 am, "Larry Bud" <larrybud2...@y ahoo.comwrote:
On Apr 13, 12:04 pm, bba...@yahoo.co m wrote:
I have a Grid View and I want to sort the data in Gridview by clicking
on column. How can I do that.
Turn on "AllowSorti ng" property in the Gridview.

I Turned on "AllowSorti ng" property in the Gridview. but it's not
working and columns headers are not clicakble.
Are you using databound data? If not, the sortexpression property
will need to be manually set. Edit Columns of the
datagrid, select a column, find sortex[ression property under
Behavior. Give it a value. Databound items default to
the field name of the databound item.

Apr 13 '07 #4

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

Similar topics

5
2482
by: pmud | last post by:
Hi, I need to display columns in a data grid based on 7 different queries. Now I have 32 questions: 1. Is it possble to have 1 single data adapter with 7 queries & 1 data set or do I need to have a separate data adapter & a separate data set for each select query? If thats possible then how?
12
2373
by: pmud | last post by:
Hi, I am using teh following code for sorting the data grid but it doesnt work. I have set the auto generate columns to false. & set the sort expression for each field as the anme of that field... This grid displayes results based on users search.. public static int numberDiv; private void Page_Load(object sender, System.EventArgs e) {
1
1301
by: Nikhil Patel | last post by:
Hi all, I have written an ASP.Net form that displays a sortable grid. I works fine in Internet Explorer. But it gives me an error when I try to display it in 3rd party application. The error says something like "object expected" in the following line: <td nowrap="nowrap"><a href="javascript:__doPostBack('dgProposals$_ctl1$_ctl0','')"...
0
3221
by: Brian Henry | last post by:
Here is another virtual mode example for the .NET 2.0 framework while working with the list view. Since you can not access the items collection of the list view you need to do sorting another way... here is my code on how I did it to help anyone starting out get an idea of how to use virtual mode in ..NET 2.0 Imports...
2
4257
by: Joe Griffith | last post by:
I'm using a Win Forms Data Grid View control in unbound mode. When I add columns using the wizard the first item is the column name. Everything works fine. However, if you return to the columns collection and look at the poperties of an individual column the name property is not in the list. Is there a way to change (or even find) the...
117
18440
by: phil-news-nospam | last post by:
Is there really any advantage to using DIV elements with float style properies, vs. the old method of TABLE and TR and TD? I'm finding that by using DIV, it still involves the same number of elements in the HTML to get everything just right. When you consider the class attribute on the DIV elements, there's not much size savings anymore...
0
1152
by: DBLWizard | last post by:
I posted a message on the topic earlier and thought I had it solved but in testing have found problems. I have a Templated GridView control on a webpage bound to an ObjectDataSource. There are 3 columns that are "Sortable" That sorting works fine until I add the dropdown with a "refresh" button into the mix. The only way that I have found...
1
4142
by: =?Utf-8?B?YmJkb2J1ZGR5?= | last post by:
I have a grid view that pulls data from a dbf file. I set the Allow Sorting to true and I put my code in the Sorting event. The problem is that I can't get the sorting to work so I wrote some info to a text file to see what is happening. What I found out is that when I clicked on a column to sort it the Sorting function was continuously...
2
7583
by: rameshgohil | last post by:
I am using grid view and a button column in it using <itemTemplate> but I am not able to rerive cell value of a selected row from grid view. I have tried the following to methods in Row_command event of gridview but it gives Null reference exception error while clicking the button in button column of grid view : int index =...
0
7659
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7882
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8103
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7945
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6244
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3634
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2079
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1194
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
916
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.