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

How do I set the dropdownlist selected value on the server page laod event?

Thread ID:





119711 Jul 23,2015 03:17 PM UTC Sep 28,2016 10:39 AM UTC ASP.NET Web Forms 3
Tags: DropDownList
David Farmer
Asked On July 23, 2015 03:17 PM UTC

Hi, I'm using the asp.net DropDownList control bound to a sql data source

<ej:DropDownList ID="DropDownList" runat="server" DataSourceID="sqlGroups" DataTextField="fldGroup" DataValueField="fldGroup">


On the server page load event I want to find a value in the dropdownlist and select it.

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

If Not IsPostBack Then

   Dim strGroup As New Syncfusion.JavaScript.Web.DropDownListItem

   strGroup.Text = "test text"

   strGroup.Value = "test value"

  DropDownList.SelectedItemIndex = DropDownList.Items.FindIndex(strGroup)

End If

End Sub

I guess it will be something like this

Ezhil S [Syncfusion]
Replied On July 27, 2015 04:45 PM UTC

Hi David,

Sorry about the inconvenience caused.

Currently it is not possible to access Items from code behind when data bound with DataSource in DropDownList control. We have internally logged this issue, and fix will be included in our upcoming SP1 release which is planned to roll-out in the end of July , 2015

Please let us know if you have any queries.


Ezhil S

Oscar Daniel Vega Castaneda
Replied On September 27, 2016 03:39 PM UTC

Ezhil S

Hi, this issues was solved?, I'm using Syncfusion 2016 Vol 1 ( and I can't set value to dropdownlist. How I can do that?

Kasithangam C [Syncfusion]
Replied On September 28, 2016 10:39 AM UTC

Hi David, 
Yes, the reported issue has been fixed in 2016 Vol 1 ( We have a property called “value” which is used to specify the value for DropDownList control. Please find the code for same: 
  protected void Page_Load(object sender, EventArgs e) 
            DrpDwnsql.Value = "Waterways"; 
We have prepared the sample based on your requirement and it is available under the following link: 
Sample: Sample 


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