Having trouble getting help?
Contact Support
Contact Support
Server Side Events
27 Apr 20183 minutes to read
The following are the server side events available in the DropDownList control.
Event | Event Description | Event Description |
---|---|---|
OnCheckChange | Occurs when CheckBox value is change. |
Event Argument contains the following parameters,
|
OnValueSelect | Occurs when DropDownList Active list changes. |
Event Argument contains the following parameters,
|
In the ASPX page, add the DropDownList control to configure the DropDownList events.
<ej:DropDownList ID="dropdownlist" TargetID="list" Width="200px" OnValueSelect="dropdownlist_ValueSelect" ShowCheckbox="true" OnCheckedChange="dropdownlist_CheckedChange" runat="server" OnCascade="dropdownlist_Cascade" OnSearch="dropdownlist_Search" >
</ej:DropDownList>
<div id="list">
<ul>
<li>Art</li>
<li>Architecture</li>
<li>Biography</li>
<li>Comics</li>
<li>Sports</li>
<li>Science</li>
</ul>
</div>
The code Define dropdownlist ValueSelect server side event in behind.
protected void dropdownlist_ValueSelect(object sender, Syncfusion.JavaScript.Web.DropdownListEventArgs e)
{
//e.EventType – Event Name
//e.Arguments – Contain keys and values for IsChecked,Text,Value,SelectedText and ItemId
//e.Text – Text value of selected node
//e.Value – Value of selected node
//e.SelectedText – Text of selected node
//e.ItemId – Index value of selected node
}
protected void dropdownlist_CheckedChange(object sender, Syncfusion.JavaScript.Web.DropdownListEventArgs e)
{
//e.IsChecked – Status of Checkbox
}
protected void dropdownlist_Cascade(object sender, Syncfusion.JavaScript.Web.DropdownListEventArgs e)
{
//e.CascadeValue - Get the cascaded DropDownList value
}
protected void dropdownlist_Search(object sender, Syncfusion.JavaScript.Web.DropdownListEventArgs e)
{
// e.SearchString - Entered search string in textbox
// e.SearchedListItems - Get the list of items searched
}