Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Display Modes
  #1 (permalink)  
Old October 3rd, 2006, 09:42 AM
Authorized User
Points: 239, Level: 4
Points: 239, Level: 4 Points: 239, Level: 4 Points: 239, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jul 2005
Location: , , .
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Default Data View Sorting Question

Hello and thanks for taking a moment to read this message. I am using a DataView to sort on the columns of a datagrid.(Doing this from within the SQL turned out to be more trouble than it was worth in this particular case.) The problem is that my DataGrid also allows paging.

 I am trying to figure out how to sort data on a page by page basis.( example, if I'm on page 3 of my data grid, I want to click on a grid column and see only they sorted data which was on page 3) Currently, when I click a column heading, it shows me the data at the very top of the result set. (again, not what I want if I was on page 3) Itr should be noted that I am not doing custom paging in this case. Below is my snippet of Codebehind that runs when I click a column heading. Any help would be greatly appreciated.Thanks,


public void Grid_Sort( Object source,DataGridSortCommandEventArgs e)


//Get the entire result Set

ActionLinkSupport alxr = new ActionLinkSupport();

DataSet ds = alxr.GetInventoryDataForActionLink(Convert.ToInt32 (drpRetailer.SelectedValue),(drpDisplayName.Select edItem).ToString(),(drpDisplayPopItemDescription.S electedItem).ToString(),Convert.ToInt32(ddaction.S electedValue),e.SortExpression.ToString());

//Use a Data View to be able to sort on the columns will sort on e.SortExpression

DataGrid2.DataSource = new DataView(ds.Tables["tblInventoryItems"],string.Empty,e.SortExpression.ToString(),DataView RowState.CurrentRows);




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
A simple Sorting question bonekrusher XSLT 2 November 25th, 2007 08:40 AM
about grid view sorting rdinesh1975 ASP.NET 2.0 Professional 3 August 9th, 2007 05:27 AM
Sorting on similar tags question terrypink XSLT 21 April 2nd, 2007 02:55 PM
Subform data sheet view question amob005 Access 1 December 5th, 2006 08:13 AM
HELP! More complicate sorting nodes question kevin_in_black XSLT 2 April 13th, 2004 05:51 AM

All times are GMT -4. The time now is 10:35 AM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.