- Online Barcode Generator
- How To
- Buy Now
In the previous user manuals for Kettic DropDownTree control, we have introduced a few client side events for it, which includes DropDown opening & closing, node entry adding & removing, button clicking and so on. In this guide, we will introduce to you some of the server-side events for working with DropDownTree menu entries.
NodeDataBound: NodeDataBound is a server-side event that only occurs when the nodes in the tree of your DropDown are bound to a certain data source. In order for this event to work, the event handler only receives two parameters:
The first one is the instance of the Kettic DropDownTree firing the event. And the second one is an event argument parameter which includes the DropDownTreeNode property for returning the node.
As for the data binding, we have detailed tutorials for DropDownTree data binding to array, and DropDownTree data binding to datatable. You can directly go to corresponding pages for more information.
OnEntryAdded: This is the second server-side event that you should get to know. This event only occurs when a new entry is added to the DropDownTree entry area, which leads to a postback. Again the event handler receives two parameters:
The first one is still the instance of the DropDownTree firing this event. While the second one is an event argument parameter which includes the Entry property for returning the entry that has just been added to the input.
OnEntryRemoved: As the name suggests, this OnEntryRemoved event is also a server-side event that occurs only when an entry is removed from your Kettic DropDownTree entry area, thus causing a postback. Similar to the events introduced above, the event handler receives two parameters for this event as well.
The first parameter is still the instance of the DropDownTree control firing this event. And another one is an event argument parameter which includes the Entry property, so as to return the entry which has just been removed from the input.
Aspx sample codes here:
<kettic:PerDropDownTree ID="PerDropDownTree1" runat="server"
Visual C# sample codes:
protected void PerDropDownTree1_EntryAdded(object sender, DropDownTreeEntryEventArgs e)
ASP.NET AJAX UI Controls