Server-side events

1 Oct 20151 minute to read

Event Name Description Parameters
OnClickEvent Event triggered when the Split Button is clicked (Object Sender, SplitButtonEventArgs e)
e.Status - Status of the Split Button whether it’s true or false.
OnItemSelect Event triggered when select the item in the split button (Object Sender,SplitButtonSelectEventArgs e)
e.MenuId –id of the selected item
e.MenuText –Text of the selected item

The following step explains on how to define server side event for Split Button control.

In an ASPX page, define the Split Button control.

  • HTML
  • <ej:SplitButton ID="SplitButton" runat="server" Size="Large" ShowRoundedCorner="true" Text="Save" OnClick="SplitButton_Click" OnItemSelect="SplitButton_ItemSelect">
              <ej:SplitItem Text="Open"></ej:SplitItem>
              <ej:SplitItem Text="Save"></ej:SplitItem>
              <ej:SplitItem Text="Delete"></ej:SplitItem>

    In CS page, define the events for Click and ItemSelect Event.

  • C#
  • protected void SplitButton_Click(object Sender, Syncfusion.JavaScript.Web.SplitButtonEventArgs e)
    	   // e.Status - returns the status of the Split Button   
    protected void SplitButton_ItemSelect(object Sender, Syncfusion.JavaScript.Web.SplitButtonSelectEventArgs e)
    	 // e.MenuId- returns the current ID of Split Button
    	 // e.MenuText- returns the current text of Split Button