Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 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 Search this Thread Display Modes
  #21 (permalink)  
Old June 9th, 2009, 06:48 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

You still have an incorrect GetList mthod as it still has paramaters like , int startRowIndex, int maximumRows

Also, are you aware of the Debugger? Set breakpoints in your code and watch it. See where it breaks; see what code gets hit, see what sortExpression etc contains. I am not your on-line debugger and I can't do thid for you: you need to thoroughly investigate this yourself..... I can ony help in advising what to do....

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
  #22 (permalink)  
Old June 9th, 2009, 08:29 AM
Authorized User
 
Join Date: Mar 2009
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I had deleted the parameters ... excuse me I've sent the wrong method!

Now I try with debug...
  #23 (permalink)  
Old June 10th, 2009, 09:57 AM
Authorized User
 
Join Date: Mar 2009
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Default

SortParmaterName in GetList method is null (I've tried with debug)
  #24 (permalink)  
Old June 10th, 2009, 12:27 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi il_dandi,

This is going to take soooooo long. ;-(

I hate to say it but I am about to give up. I am getting pretty frustrated about this thread because you (we) are not making any progress at all.

You're not providing enough information to me to say something useful, while at the same time you don't seem to have all the skills you need to either figure this out yourself or provide me with the relevant information to help you sort it out. This would be a two-minute job to fix if I were sitting next to you (or if you understood what this was all about) but you're making it nearly impossible with the information you provide. Statements like "SortParmaterName in GetList method is null" hardly add any value to this thread. I am sure it's null sometimes which is by design when the page first loads. But does it stay null? What happens when you sort? What happens after a postback? Do you even get any data at all? Did you set the right parameters on all the controls? Can you see the Sorting event fire at the Grid? What's on the call stack when you debug GetList (that is, who calls GetList). And so on and so forth. Why don't you explain exactly what you are doing?

I am not sure what you expect from me but I hope you understand I cannot look into your head or IDE and see what's going on. I can only see what you're posting here which is not a lot. Please realize I cannot run your code to see what goes wrong as I only have fragments of it that don't compile let alone run. So, all I see is what you post here.

Without this information I can't help you. Maybe this whole n-layer thing is a bridge too far for you at the moment? My advise: get a better understanding of what you're doing before you do it. This is taking you way more time than it should which is a waste of your resources and time. Having a firm understanding of the debugger, Visual Studio, .NET in general and the ASP.NET post back architecture and control design in particular are crucial if you want to build something like an N-Layer ASP.NET application.

Maybe I sound a bit harsh, but that's not my intention. I just don't know how to help you otherwise.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
  #25 (permalink)  
Old June 10th, 2009, 12:48 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

One more thing (or actually a few things).

1. I don't understand why this code even works. Your latest GridView doesn't even set the DataSourceID so how does it gets its data at all?

2. The GridView doesn't have AllowSorting set so how does it know how to sort? How come your column headers are clickable?

3. I copied most of your source to a new project, deleted what wasn't relevant, cooked up a custom version of GetList that returns some random PDR items, set AllowSorting and a DataSourceID on the GridView and bham, bingo, instant sorting. Note I don't have any other code in Code Behind. Just a simple GridView, an ODS and a PDR, PDRCriteria and PDRManager class in App_Code and nothing more. Everything works as expected; so the problem must be in something (or some code) you're not showing or telling us.
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
about grid view sorting rdinesh1975 ASP.NET 2.0 Professional 3 August 9th, 2007 05:27 AM
client side sorting and paging in data grid prankur ASP.NET 1.0 and 1.1 Basics 1 February 3rd, 2006 12:05 PM
client side sorting and paging in data grid prankur ASP.NET 1.0 and 1.1 Professional 1 February 3rd, 2006 12:00 PM
Data grid sorting on page 707 matejx BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 6 December 2nd, 2005 05:43 AM
Sorting in Data Grid matt.fields ASP.NET 1.0 and 1.1 Basics 0 October 21st, 2003 12:39 PM



All times are GMT -4. The time now is 11:25 PM.


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