473,756 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Default sort column and order in Gridview?

I have a gridview displaying News items and fetches the data through a
(little complicated) sql stored procedure... The sorting seems to be done in
the gridview since there is no sorting implementation in the stored proc
(well actually it is sorted by DateIn DESC by default but still the gridview
by default displays the items as sorted by DateIn ASC by default!!). The
user can then use the gridview's built in sort function to sort after other
fields.

Is there any way to make the Gridview sort the items by DateIn DESC by
default?
Feb 25 '06 #1
2 6006
sorry folks,
it turns out my stored proc was not correct, when ORDER BY DateIn DESC was
put in correct place the gridview correctly sorts it...

"Daves" <db****@simnet. is> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
I have a gridview displaying News items and fetches the data through a
(little complicated) sql stored procedure... The sorting seems to be done
in the gridview since there is no sorting implementation in the stored proc
(well actually it is sorted by DateIn DESC by default but still the
gridview by default displays the items as sorted by DateIn ASC by
default!!). The user can then use the gridview's built in sort function to
sort after other fields.

Is there any way to make the Gridview sort the items by DateIn DESC by
default?

Feb 25 '06 #2

"Daves" <db****@simnet. is> ¼¶¼g©ó¶l¥ó·s»D: uo************* *@tk2msftngp13. phx.gbl...
sorry folks,
it turns out my stored proc was not correct, when ORDER BY DateIn DESC was
put in correct place the gridview correctly sorts it...

"Daves" <db****@simnet. is> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
I have a gridview displaying News items and fetches the data through a
(little complicated) sql stored procedure... The sorting seems to be done
in the gridview since there is no sorting implementation in the stored
proc (well actually it is sorted by DateIn DESC by default but still the
gridview by default displays the items as sorted by DateIn ASC by
default!!). The user can then use the gridview's built in sort function to
sort after other fields.

Is there any way to make the Gridview sort the items by DateIn DESC by
default?


Feb 26 '06 #3

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

Similar topics

2
15043
by: Laurence Breeze | last post by:
Is it possible to add a column to a table using the "alter table" statement and specify where in the sequence of columns the new column sits. If not is there any way to alter the order of columns using TSQL rather than Enterprise Manager / Design Table. TIA Laurence Breeze
0
1049
by: Frank Rizzo | last post by:
I've implemented sort via the well known method of assigning the an IComparer class to the .ListViewItemSorter property. It works fine except for one thing. If I had rearranged the column order in the listview and then sort the column, the listview control returns the column order to its original state. How can I tell it not to? Thanks Frank
1
1203
by: ad | last post by:
I use a GridView to display data , the datasource of my GridView is from a ObjectDataSource. How can I specify the sort column?
3
3666
by: Beowulf | last post by:
I was just messing around with some ad hoc views and table returning UDFs today so I could look at and print out data from a small table and noticed something strange. If I stick my select statement into a View the columns are returned in the order I specify in the SELECT, but if the same statement is in a UDF (so I can specify a parameter), the columns are not returned in the order specified in statement. I know that relations don't...
2
2014
by: joe | last post by:
how to access invisible column inside gridview
2
4715
by: denvercr | last post by:
Hi guys, I'm having a problem on this a couple of days ago.. I did the best I could but I end up nothing. you guys are my last resort.. How could I possibly retrieve a value of a hidden column in gridview? The column that is hidden is the primary key for security issue.. Hope you could help me out of this guys.. thanks for your good heart.
2
3048
by: Mariano | last post by:
Greetings, pls help me friends...somebody knows how could I see the value of a cell belong to invisible column in gridview? I have a table with fields like that : name, last name, address. I show in grid view name and last name but address is invisble, how i see the value of these cells in a rowdatabound event? Thanks a lot, Mariano
1
7180
by: Valli | last post by:
Hi, I need to display an hyperlink column in gridview where if the user clicks that column the page should move to the selected page. I have got help from this group & started using template field. After using this, I couldnt see a column supporting hyperlink. In the gridviews first column header, there appears an hyperlink with the first record link displaying. That also only in header overwriting with the first column caption.
1
4505
by: olgagjor | last post by:
how can i change column in gridview with css in visual studio 2005. my table has 5 rows and 4 columns.if i want to change 3 rd column can i change entire column or i must change separately. because i want to create class for properties for the column. did i have to put class in every <td class =""> for that column or i can change entire column.
0
9152
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9930
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9716
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9571
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7116
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6410
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5180
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3676
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
3
2542
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.