Wrox Home  
 
Search P2P Archive for  go

More Wrox Resources

  Return to Index  

asp_web_howto thread: Sorting data in listview based on click of column header


Message #1 by "Nilesh Parekh" <nilesh_parekh@d...> on Wed, 23 Jan 2002 11:18:16 +0530

This is a multi-part message in MIME format.



------=_NextPart_000_0118_01C1A3FF.A7A1EEC0

Content-Type: text/plain;

	charset="iso-8859-1"

Content-Transfer-Encoding: quoted-printable



Hi All,



In ASP page, I am displaying data in listview control. The problem is I 

want the utility that when user clicks on ColumnHeader of the listview, 

the data in it shall get sorted on that column. For that I was using 

ListView1_ColumnClick event.



I tried doint the same in VB. It is very much possible in it. In VB the 

event is,



Private Sub ListView1_ColumnClick(ByVal ColumnHeader As 

MSComctlLib.ColumnHeader)



But in ASP the same event is without any parameter,

Code in Client-side java script is as follows.



function ListView1_ColumnClick()





Here in java script I am not getting ColumnHeader object as parameter, 

so when columnheader is click, the ListView1_ColumnClick() event gets 

fired. but it does not give me info about which column is clicked. So I 

can not know on which column the data to be sorted on.



Please let me know if anyone has the solution to this.



Thanks,

Nilesh












Message #2 by danny.o'reilly@d... on Wed, 23 Jan 2002 14:53:10

This might not be what you are after but I was reminded of a sorting 

feature in javascript for table headings at 

http://javascript.internet.com/forms/sort-data-table.html



Danny


  Return to Index