Set display order of ListBox control

H

Hardy Wang

Hi
I have a ListBox control in my ASP.NET page. After I binding data to this
control, I would like to be able to change this display order of items in
this control. Just like change layout function of my.yahoo.com.
I tried client side approach, yes I can change display order by JavaScript,
but after clicking one of the button the display order will reverse back to
its original status. Because after PostBack, the page will try to render
this control by viewstate again.

I tried server side approach, but looks there is no way to switch two
ListItems programmatically.


Is there anybody who has some good idea?

Thanks!

--



WWW: http://hardywang.1accesshost.com
ICQ: 3359839
yours Hardy
 
H

Hardy Wang

Dump content of listbox to array, sort array in memory, then clear this
listbox and add listitem from array one by one.
 
J

Joe Fallon

Yep.
That is what my listbox sort routine does.
Just wondering if you came up with something different.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top