| | |
Speedup CheckBoxList search
Please support our ASP.NET advertiser: Intel Parallel Studio Home
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
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
| Thread Tools | Search this Thread |
.net activexcontrol advice ajax alltypeofvideos appliances asp asp.net bc30451 beginner bottomasp.net box browser button c# cac checkbox click commonfunctions control css dataaccesslayer database datagridview datagridviewcheckbox datalist deadlock deployment development dgv dialog dropdownlist dynamic dynamically edit embeddingactivexcontrol expose fileuploader fill findcontrol flash formatdecimal formview gridview gudi iframe iis javascript listbox login microsoft mono mouse mssql multistepregistration news novell numerical objects opera panelmasterpagebuttoncontrols radio redirect registration relationaldatabases reportemail rotatepage save schoolproject search security sessionvariables silverlight smartcard smoobjects software sql-server sqlserver2005 ssl suse textbox tracking treeview unauthorized validatedate validation vb.net video videos virtualdirectory vista visualstudio web webapplications webdevelopemnt webdevelopment webprogramming webservice xsl youareanotmemberofthedebuggerusers






