Sorting columns when displaying single column in DataList

Currently, I am using the DataList to display the data. My DataList code looks something like this:

<datalist>

<itemTemplate>

<tr>

<td>Name:</td>

<td><% DataBinder.....%></td>

</tr>

<tr>

<td>Company:</td>

<td><% DataBinder.....%></td>

</tr>

</itemTemplate>

</datalist>

 My question is: How can I have an easy way of sorting this data. I would like the users to be able to sort the data by Name or by Company. I understand I can add AllowSorting to DataList or DataGrid, but then I would have to display the column names and display the data in 2 columns, which I dont want to do.

So is there any other way to allow the users to sort this data, without having to write much code? I am using ASP.NET 2.

 Thanks
0
hasanali00
11/25/2006 4:34:16 PM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

0 Replies
669 Views

Similar Articles

[PageSpeed] 25
Get it on Google Play
Get it on Apple App Store

Reply:

Similar Artilces:

Displaying single column of data across multiple columns..
Hi all... Okies my problem.... I have a dataset that has a single column, with 100 rows. I wan't to display this in a table with 4 columns with 25 rows in each column.. Does anyone know of a simple solution? Thank's in advance. Jeremy Baka Saru Hi, you can try the DataList with RepeatColumns property set to 4.  Alvin ChooiMicrosoft ASP.NET™ Enthusiast v1.1 / v2.0, Malaysia Blog : http://alvinzc.blogspot.com...

Displaying a single Data Window Column in multiple columns
I have a datawindow that is retrieving a single column. Using Powerbuilder 5.04, is there anyway to display this data in multiple columns sorted (alphabeticlly) vertically (eliminates n-up). Any help would be appreciated. Thanks Yehuda Newspaper columns? Yehuda wrote in message <3ACB5511.E9262E3C@yahoo.com>... >I have a datawindow that is retrieving a single column. Using >Powerbuilder 5.04, is there anyway to display this data in multiple >columns sorted (alphabeticlly) vertically (eliminates n-up). Any help >would be appreciated. >Thanks >Yehuda &...

displaying multiple columns in a gridview populated from a single column
hi, i'm a newbie so my apologies in advance if i am not explaining my problem clearly... i'm happy to repost to help clarify anything. Problem: i am not able to sort and organize my record set the way i need to to popluate my gridview. i am looking for suggestion on either how to construct my sql statement, or manipulate my gridview. Environment: i am working in asp.net 2.0 and using a sql server db. Details: I have a single table called Loans. i need to retrieve three columns from that table: LoanOfficer, LoanState, and LoanKey. The LoanState column contains one of three v...

VB.NET 1.1 Searching through DataList Column by Column
Hi,I am trying to search through a DataList column by column.  I am doing this so that if each cell within that sector is empty then I will hide that column.  I have implemented a quick function in order to do this, however, it is searching through the datalist row by row.  Below is my code, with explanations of what the code is trying to do.  I think the problem is to do with the String sector.  Is there anyway that I can change the sector string so that it will iterate through the table (dataset) column by column.Code:Dim myData As Data.DataSet = dbAccess.getChildr...

When is a column not a column?
I have several extremely similar datawindows that I have to maintain that go against the same table. Recently, I had to add a column to that table, and also add the column to ALL of these datawindows that go against this table. I added the column to the first datawindow, set up the edit control style, etc. I then did a copy/paste of the columns edit control to the remaining dw's (of course remembering to first add the column in SQL). Everything (update props, column specs, column props) seems to indicate that the pasted column is linked to the column I selected, HOWEVER, when I...

Datagrid sort -Sorting a column which is mapped to database column
How do I sort a datagrid column ,which is not mapped to database column. I'm able to sort other columns from the same datagrid which are mapped to database column and this grid has one of the columns which is not mapped to database column. But need to know how to sort the column which is not mapped to database column.     needtoknow: How do I sort a datagrid column ,which is not mapped to database column. I'm able to sort other columns from the same datagrid which are mapped to database column and this grid has one of the columns which is not mapped to database ...

Sorting Columns within columns
In sent items, I need to be able to sort first by 'To' and then by 'Date' so that all mail sent to one person is grouped together and in date order. (Bit like the sort you can do in Excel).There only appears to be one sort option. Any ideas anyone? Sort by date first, then by the To, as Sorts normally do a minimum movement approach, that should get you what you want, but it would always be a manual process - you can't store the double sort Cheers Dave -- Dave Parkes [NSCS] Occasionally resident at http://support-forums.novell.com/ You can regist...

How I sort the gridview column after column
I have the following columns in my gridview(VB) Type   FirstName   LastName    Company   City How I can sort the gridview firstly by column 1, after that by column 2 and so on. Thanks in advance.   You can write your SQL SELECT statement this way: SELECT Type ,  FirstName,   LastName,    Company,   City  FROM yourtable ORDER BY 1 ASC, 2, 3,4, 5 OR SELECT Type,  FirstName,   LastName,    Company,   City  FROM yourtable ORDER BY  Type&...

Controlling a single column with multiple radio buttons...sort of...
My apologies if this gets verbose, but I'd better start explaining from the beginning... I have a table to control user access. It is used for granting everything from table level rights down to field level rights. It is simple. 3 columns. UserID, Password and Rights. The idea is this. If the developer wants to control access to something, then that something is assigned the next available character position in the column Rights. (I'll explain...) Our possibilities for granting rights are as follows... No Access (n) Depositor(d) Reader(r) Author(a) Editor(e) Manage...

Why 2 <td> columns in Design tab are displayed as 1 column only in a browser presentation?
I have coded a Table with 1 <tr> and 2 <td> to read fildes from 2 folders.The Design tab did show coding 1 and coding 2 as 2 cells/columns side by side in one row of a table.  However, the browser presentation showed the files ofthe 2nd folders directly under the files of the 1st folder.  Why the browser presentation showed only one coulmn while the Design tabshowed 2 columns?  What might be the reasons for this mistake? TIA,Jeffrey      Please post your HTML.Please remember to "mark as answered" posts that ...

Re: How to control the columns displayed on a .net page depending on the page the user is coming from
  Hi all,    I have got two pages on wy website which contains a form to submit data into the same database. The two pages have also got a link to view the submitted data. The challenge I have got at the moment is, I want to be able to control columns the users see depending on the which of the two pages they are coming from. I know I can simply create two more separate pages but I don't want to do that. I feel I can be clever and achieve this with a conditional statement but to be honest, I don't know how to go about this. Could you please help me on thsi? Bas...

Sorting in datalist / Displaying image icons next to column's title
Hi, I created a datalist with sorting functionality. In the column headers I included linklabels. When those are clicked the datalist gets sorted on this column. But for the user friendly interface I'm creating I want to include an icon next to de columns title which indicates the column being sorted and also if the column is sorted ascending or descending. I included an <asp:image> in my linklabel tag so when it is clicked I find this image set it to visible and I change its image url. But unfortunately this doesn't seem to work. The image stays invisible. Any help? ...

split single column into multiple column
 Hi all,I have table with 2 columns as shown below...id     products_list  1    a,b,c2     d,e,f3     g,h,iNow I need a query which will ouput the result as below...id     products_list1    products_list2       products_list3  1    a                      b                    &...

Display Multiple Columns into One Column
My first ASP.NET/SQL project. I'm creating an Asset Management DB. I wish to view the Asset number, the full name of the user it's assigned to and the Make and Model of each record in the DB. However assets are split into different categories e.g. monitors, PCs, Preinters etc. and they are all in different tables. The SQL below displays the asset number, Name of person assigned and the model of the asset. SELECT Hardware.AssetNo, [User].FullName, MonitorModel.Model, PCModel.Model AS Expr1, PrinterModel.Model AS Expr2 FROM Hardware INNER JOIN [User] ON Hardware.UserID = [User].User...

Web resources about - Sorting columns when displaying single column in DataList - asp.net.presentation-controls

List of mammals displaying homosexual behavior - Wikipedia, the free encyclopedia
For these mammals, there is documented evidence of homosexual behavior of one or more of the following kinds: sexual behavior , courtship , affection ...

Facebook Displaying Page Insights On Page Admins’ Personal Pages?
Some Facebook page administrators are seeing modules on their personal pages displaying page insights ad, campaign , and like totals for pages ...

Facebook Displaying Unread Messages from Pages in a New Updates Module
Facebook is displaying a new “Updates” sidebar module which shows some users unread messages sent to them by Pages. Users will see the Updates ...

Don Lemon Holds Up Sign Displaying the N-Word, Uncensored, on Air CNN Live - YouTube
Don Lemon Holds Up Sign Displaying the N-Word, Uncensored, on Air Lemon held up a Confederate flag first before holding up the sign. He asked, ...

Hazelwood coal mine fire: Morwell residents displaying symptoms similar to cigarette smokers, expert ...
An expert says some locals near Victoria's Hazelwood mine fire have symptoms similar to cigarette smokers.

Police accused of displaying fake G20 weapons
Toronto's top police officer misled the public by displaying fake weapons used in a medieval-themed role-playing game to help justify their actions ...

No charges for U.S. host for displaying high-capacity magazine on TV
NBC television journalist David Gregory won't face charges for displaying a high-capacity ammunition magazine on his "Meet the Press" news program ...

Jays' Escobar suspended three games for displaying slur
Toronto Blue Jays shortstop Yunel Escobar has been suspended three games for displaying a homophobic slur on his eye-black during a game on Saturday. ...

Google Play Store now displaying age-based ratings
We reported back in May that Google was adding age-based ratings to all apps in the Play Store as determined by the International Age Rating ...

Apple displaying Ferraris & other cars at WWDC hinting at CarPlay announcements
... 2014 Filed under: AAPL Company , iOS Continue reading more about AAPL Company and iOS at 9to5Mac . What do you think? Discuss "Apple displaying ...

Resources last updated: 1/16/2016 2:52:39 PM