473,402 Members | 2,064 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,402 software developers and data experts.

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 5985
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****************@TK2MSFTNGP09.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.g bl...
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****************@TK2MSFTNGP09.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
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...
0
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...
1
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
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...
2
by: joe | last post by:
how to access invisible column inside gridview
2
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...
2
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...
1
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...
1
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
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
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
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...
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.