Hi Cesar,
Thanks for contacting Syncfusion support.
We checked the reported error by rendering ejDropDownList with the shared code. We suspect that you are trying to update the label text based on the text selected from ejDropDownList. However, the given code works fine in our end.
Refer to the complete code used in our end.
<ej:DropDownList ID="brandSelect" runat="server" DataIdField="ID" DataTextField="Text" MultiSelectMode="Delimiter" DelimiterChar="-" ShowCheckbox="true" DataSourceCachingMode="ViewState"></ej:DropDownList>
<br />
Selected value after post back:
<br />
<asp:Label runat="server" ID="lbl"></asp:Label><br />
<asp:Button runat="server" Text="PostBack" ID="btn1" OnClick="btn1_Click" /> |
Aspx.cs:
protected void Page_Load(object sender, EventArgs e)
{
List<Data> DropdownData = new List<Data>();
DropdownData.Add(new Data { ID = "1", Text = "Top brand" });
DropdownData.Add(new Data { ID = "2", Text = "Fashion brand" });
DropdownData.Add(new Data { ID = "3", Text = "Latest brand" });
DropdownData.Add(new Data { ID = "4", Text = "High quality" });
DropdownData.Add(new Data { ID = "5", Text = "Low price" });
brandSelect.DataSource = DropdownData;
}
protected void btn1_Click(object sender, EventArgs e)
{
lbl.Text = "";
foreach (string val in brandSelect.Text.Split(','))
{
lbl.Text = val + ",";
}
}
} |
The selected values are updated for labels as shown below.
We have attached a sample for your reference in the following link.
Kindly check the above sample and if the issue persists, modify the sample to replicate the exact issue along with the product version to serve you better.
Please let us know if you need further assistance.
Regards,
Keerthana R.