You should be able to itereate through the Items and set the Selected property to true. Not familiar with this control, but I looked at it very briefly.
I can't think of a reason it would be slow, although I can't say for sure because I haven't used the control. How many items are you iterating through? And can you show that code?
Your code looks correct. I'm afraid I don't know how you'd improve performance. But do you really want to have dropdownlists with thousand of items, let alone 15 of them? You might consider using something like an autocompleteextender or a jQuery equivalent
of that...
priyamvadhag
Member
3 Points
25 Posts
Saplin Dropdown checkboxes default selectall
Oct 08, 2012 01:25 PM|LINK
Hey Guys,
I am using the multiselect dropdown from the below link. When we bind to the dropdown, the checkboxes are uncked. Can we default them as checked?
http://dropdowncheckboxes.codeplex.com/
MetalAsp.Net
All-Star
112051 Points
18235 Posts
Moderator
Re: Saplin Dropdown checkboxes default selectall
Oct 08, 2012 01:49 PM|LINK
You should be able to itereate through the Items and set the Selected property to true. Not familiar with this control, but I looked at it very briefly.
priyamvadha
Member
12 Points
22 Posts
Re: Saplin Dropdown checkboxes default selectall
Nov 14, 2012 01:00 PM|LINK
If I am looping, the page is very slow....I looked at the blog to make the select All without looping. Please help me?
MetalAsp.Net
All-Star
112051 Points
18235 Posts
Moderator
Re: Saplin Dropdown checkboxes default selectall
Nov 15, 2012 12:19 PM|LINK
I can't think of a reason it would be slow, although I can't say for sure because I haven't used the control. How many items are you iterating through? And can you show that code?
priyamvadha
Member
12 Points
22 Posts
Re: Saplin Dropdown checkboxes default selectall
Nov 15, 2012 12:34 PM|LINK
I have thousands items in the dropdown and have 15 dropdowns on the same page.
foreach (ListItem item in DD.Items)
{
item.Selected = true;
}
MetalAsp.Net
All-Star
112051 Points
18235 Posts
Moderator
Re: Saplin Dropdown checkboxes default selectall
Nov 15, 2012 01:04 PM|LINK
Your code looks correct. I'm afraid I don't know how you'd improve performance. But do you really want to have dropdownlists with thousand of items, let alone 15 of them? You might consider using something like an autocompleteextender or a jQuery equivalent of that...
priyamvadha
Member
12 Points
22 Posts
Re: Saplin Dropdown checkboxes default selectall
Nov 15, 2012 01:11 PM|LINK
I have 15 dropdowns...but i have thousand items in only one dropdown....what is autocompleteextender??
priyamvadha
Member
12 Points
22 Posts
Re: Saplin Dropdown checkboxes default selectall
Nov 15, 2012 01:14 PM|LINK
Can i use update panel?
MetalAsp.Net
All-Star
112051 Points
18235 Posts
Moderator
Re: Saplin Dropdown checkboxes default selectall
Nov 15, 2012 01:52 PM|LINK
Updatepanel will not help.
AutoCompleteExtender: http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/AutoComplete/AutoComplete.aspx. Not sure if it'll work for you in your scenario.