Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > ASP.NET 2.0 sort DataList without query again

Reply
Thread Tools

ASP.NET 2.0 sort DataList without query again

 
 
hohans@yahoo.com
Guest
Posts: n/a
 
      01-07-2006
Hi All,

In 2.0, how do you sort DataList without executing the query again?

So far what I found in the Web all show examples where you need to
re-execute the query against DB with passed in field name and sort
direction. The data source has been bound to the control. Can we
somehow just retrieve it, sort it and bind it again? Any ideas will be
truely appreciated.

Hans

 
Reply With Quote
 
 
 
 
funphxnaz@aol.com
Guest
Posts: n/a
 
      01-08-2006
Yes, I just posted something similiar and would like to know.

 
Reply With Quote
 
 
 
 
funphxnaz@aol.com
Guest
Posts: n/a
 
      01-08-2006
Anyone??

 
Reply With Quote
 
Axel Dahmen
Guest
Posts: n/a
 
      01-09-2006
Hi Hans,

actually what happens when you bind a data control do a data source is that
it reads the data contained in the data source and creates html from it when
you call the DataBind() function. It doesn't store the data source any
further than that.

The syntax is a bit confusing, I must admit. It would have been simpler to
understand if there wasn't a DataSource property and if the DataBind()
function had the data source as its sole parameter, like
"DataBind(myDTable);".

HTH,
www.sportbootcharter.com
Axel Dahmen


---------------
<> schrieb im Newsbeitrag
news: ups.com...
> Hi All,
>
> In 2.0, how do you sort DataList without executing the query again?
>
> So far what I found in the Web all show examples where you need to
> re-execute the query against DB with passed in field name and sort
> direction. The data source has been bound to the control. Can we
> somehow just retrieve it, sort it and bind it again? Any ideas will be
> truely appreciated.
>
> Hans
>



 
Reply With Quote
 
hohans@yahoo.com
Guest
Posts: n/a
 
      01-09-2006
Hi Axel

or anyone who would like to give input:

If the data source bound to a control is just for reading, then how
does it maintain view state? Remeber when EnabledViewState is true, it
is supposed to (actually it does do) display the same data accross page
postback, right?

Hans

 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to convert url with query string to url without query string nick Javascript 1 02-13-2011 11:20 PM
Chris Pine tutorial assistance chapter 7 sort data without use of.sort method jgheal@googlemail.com Ruby 9 11-27-2008 07:36 PM
Chris Pine tutorial assistance chapter 7 sort data without use of.sort method jgheal@googlemail.com Ruby 0 11-24-2008 11:21 PM
Setting up a datalist control - Item_DataBound for a datalist in a datalist Nevyn Twyll ASP .Net 8 09-09-2004 10:13 PM
Ado sort error-Ado Sort -Relate, Compute By, or Sort operations cannot be done on column(s) whose key length is unknown or exceeds 10 KB. Navin ASP General 1 09-09-2003 07:16 AM



Advertisments