We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Setting selecteditems on serverside

Thread ID:





118700 Apr 1,2015 10:51 AM UTC Apr 3,2015 02:43 PM UTC ASP.NET Web Forms (Classic) 1
Tags: MultiSelectionDropDown
Graham Gardner
Asked On April 1, 2015 10:51 AM UTC

I have a Multiselectiondropdown control binded to a datatable, on the page load I want to be able to pre select values in this control. My code currently seems to do this successfully on the server side however the selecteditems do not appear in the control on the client side. see code snippets below. probably something simple I am not doing but can't see it myself!
following code is in page_load within a if (!Page.IsPostBack) check...

DataTable dtMP = PortalData.GetTableData("tsResults", strFilterCriteria + " GROUP BY TradeSite");
msddfMP.DataSource = dtMP;
msddfMP.DataTextField = "TradeSite";
msddfMP.DataValueField = "TradeSite";
msddfMP.CheckBoxListRepeatColumns = 4;
msddfMP.CheckBoxListRepeatDirection = RepeatDirection.Vertical;
msddfMP.PopupPositionVertical = Syncfusion.Web.UI.WebControls.Shared.PopupPositionVertical.Bottom;
foreach (string theMarketplace in PortalData.getCountryMarketplaces(theFilterValue))
     ListItem theItem = msddfMP.Items.FindByText(theMarketplace);
     if (theItem != null)
         theItem.Selected = true;
UpdatePanel15.Update(); //Display selected trade sites for country
<asp:UpdatePanel ID="UpdatePanel15" runat="server" UpdateMode="Conditional" >
<syncfusion:MultiSelectionDropDown ID="msddfMP"
  TextBoxCssClass="form-control input-sm"
  ButtonCssClass="form-control input-sm"
  ButtonHoverCssClass="form-control input-sm"
  TextBoxHoverCssClass="form-control input-sm"
  runat="server" Width="100%" >
    <asp:AsyncPostBackTrigger ControlID="btnClear" EventName="Click"  />

Ezhil S [Syncfusion]
Replied On April 3, 2015 02:43 PM UTC

Hi Gardner,

Thank you for contacting Syncfusion support.

With reference to the shared code snippet, We are unable to reproduce the reported issue on not displaying the dynamically selected items in MultiSelectDropDown control from code behind. We have prepared sample with the shared code using dummy database and that works fine at our end. Could you please share us defect sample or modify ur sample to issue at our end? So that we can provide you a solution.

We have prepared a simple sample and it can be downloaded from link below:
Please let us know if you have any other queries.

Ezhil S


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon