Forgive me if I'm wrong, but... Ed's comments are correct but I do not think they apply to what you are describing. I am going to guess that you have a default sort specified in your table tag: defaultsort="2"
and that when you added the serial number column, it is now the column number which you had previously specified. Why do I think that? Because I can't for the life of me figure out how it is getting sorted otherwise. I have never seen displaytag just arbitrarily sort a column if I did not tell it to. Anyway... ignore if I'm wrong; just trying to throw another theory out there. -----Original Message----- From: Ed Webb [mailto:e...@mws-systems.co.uk] Sent: Friday, February 19, 2010 6:18 AM To: displaytag-user@lists.sourceforge.net Subject: Re: [displaytag-user] Need to add a unsortable serial number for a table vidsan wrote: > Hi friends, > > Please help me:-(.I am using display tag in my JSP page for sorting.I > need to add serial number column with the columns which i alredy have in my > JSP page. > > And the problem is, when i sort the columns serial number column is also > sorted with the other columns.It should not happen.Though i made serial > number column as "sortable=False" its been sorted with the other columns. > the sortable attribute only marks the table as being sortable by the user on that column. It does not prevent the column from being sorted with the rest of the table. > Is there any possibilities to made serial number column as a unsortable > column. You would have to generate the serial number each time the table is displayed so that the first row is given serial number 1, the second 2 and so on. You cannot put this number into the object you are using to store your row data as the serial number will move with the row. Use a TableDecorator and create a getSerialNumber() method that return the row number. Ed! ------------------------------------------------------------------------ ------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ displaytag-user mailing list displaytag-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/displaytag-user ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ displaytag-user mailing list displaytag-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/displaytag-user