| | |
Speedup CheckBoxList search
Please support our ASP.NET advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
I want to speed ChechBoxList's getting the selected items, the normal approach is
but if I've 6000 items in the CheckListBox, that's mean I should go through the 6000 items to know which is selected. Performance POOOOOOR!!!
Is there way to get just selected ItemsCollection ??
c# Syntax (Toggle Plain Text)
foreach (ListItem li in checkListBox.Items) { if (li.Selected) { } }
Is there way to get just selected ItemsCollection ??
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
That was abount the most stupid post I have sent
I think I will edit it out
wish there was a delete button
I think I will edit it out
wish there was a delete button
Last edited by almostbob; Feb 16th, 2009 at 10:28 am.
Failure is not an option It's included free, you don't have to do anything to get it
If at first you dont succeed, join the club
Of course its always in the last place you look, you dont keep looking after you find it
Please mark solved problems, solved
If at first you dont succeed, join the club
Of course its always in the last place you look, you dont keep looking after you find it
Please mark solved problems, solved
•
•
Join Date: Dec 2008
Posts: 104
Reputation:
Solved Threads: 18
I dont think there is a built in method to get selected ItemsCollection only. Even if there is one, the algorithm would be the same as yours. So it wont solve the performance issue. One way to do this will be to use a javascript function to append the indices of only the selectedItem to a hiddenfield on its onClientClick event and then to parse the hidden field value in your code behind to get the Selected item indices.
If you get another good reliable way of doing it please post it here so that everyone can learn
Thanks
If you get another good reliable way of doing it please post it here so that everyone can learn
Thanks
Last edited by Aneesh_Argent; Feb 17th, 2009 at 1:05 am.
I got this solution too but for some reasons I preferred server side, yes Java Script would be better, Thank you Aneesh_Argent so much
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
![]() |
Other Threads in the ASP.NET Forum
- Previous Thread: control hierarchy
- Next Thread: not sure of codes
Views: 570 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for ASP.NET
.net 2.0 ajax alltypeofvideos anathor appliances application asp asp.net beginner box browser button c# cac checkbox commonfunctions complex connection control dataaccesslayer database datagridview datalist deployment development dgv dialog dropdownlist dynamic dynamically edit editing embeddingactivexcontrol expose feedback fileuploader fill findcontrol flash form formatdecimal formview gridview gudi iis image javascript languages list listbox login microsoft mobile mouse mssql news novell numerical opera panelmasterpagebuttoncontrols parent problem project radio redirect registration relationaldatabases reportemail response.redirect richtextbox rows schoolproject search security select services sessionvariables silverlight smoobjects software sql sql-server sqlserver2005 ssl theft tracking treeview validatedate validation vb.net videos vista visualstudio web webapplications webdevelopment webprogramming webservice xsl






