TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Charan raj
NA
12
11.5k
Multi selection dropdownlist
Oct 19 2011 9:06 AM
Hi,
Friends i have created multi selected dropdown list ..its fineworking properly..
i have used like a user control...
if its used one usercontrol its working properly but when use multiple user control then its not working..
the code like this...
in usecontrol.ascx
<script type="text/javascript" language="javascript">
function onCheckBoxClick(chk) {
debugger;
var combo = $find("<%= MultiSelectionCombobox.ClientID %>");
//prevent second combo from closing
cancelDropDownClosing = true;
//holds the text of all checked items
var text = "";
//holds the values of all checked items
var values = "";
//get the collection of all items
var items = combo.get_items();
//enumerate all items
debugger;
for (var i = 0; i < items.get_count(); i++) {
var item = items.getItem(i);
//get the checkbox element of the current item
var cb = $get(combo.get_id() + "_i" + i + "_chkBox");
if (cb.checked) {
text += item.get_text() + ",";
values += item.get_value() + ",";
}
}
var res = text.slice(0, text.length - 1);
alert(res);
combo.set_text(res);
}
function StopPropagation(e) {
//cancel bubbling
e.cancelBubble = true;
if (e.stopPropagation) {
e.stopPropagation();
}
}
function onDropDownClosing() {
cancelDropDownClosing = false;
}
</script>
<telerik:RadComboBox ID="MultiSelectionCombobox" Runat="server" AutoPostBack="true" OnClientDropDownClosed="onDropDownClosing" EmptyMessage="Select" HighlightTemplatedItems="true" AllowCustomText="true">
<Items>
<telerik:RadComboBoxItem Text="chireu" Value="chiru" />
<telerik:RadComboBoxItem Text="chire3u" Value="chiru2" />
<telerik:RadComboBoxItem Text="chireu4" Value="chiru1" />
</Items>
<ItemTemplate>
<div onclick="StopPropagation(event)">
<asp:CheckBox runat="server" onclick="onCheckBoxClick(this)" ID="chkBox"/><%# DataBinder.Eval(Container, "Text") %>
</div>
</ItemTemplate>
</telerik:RadComboBox>
in .aspx
<UC:multselect id="multiselect1" runat="server">
<UC:multselect id="multiselect2" runat="server">
it is not working can any one knows this sol,,
Reply
Answers (
1
)
Excel File Upload Issue
User locale in ASP.NET