|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
ASP.NET 2.0 sort DataList without query againHi 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 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 --------------- <hoh***@yahoo.com> schrieb im Newsbeitrag Show quoteHide quote news:1136595452.151862.43300@o13g2000cwo.googlegroups.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 > 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
Disable Button after click it
Panel Syntax Dynamically load webcontrol TypeConverter Question Dynamically show different web controls WebControl Click Event Not Firing ButtonColumn and EditCommandColumn don't work together as expected in DataGrid Dynamically changing LinkButton properties multiple itemtemplates datalist Clearing textbox controls after postback |
|||||||||||||||||||||||