This sample demonstrates how you can handle selection changes in WebDrillDown.
You can create custom JavaScript to perform some action in your web page.
To support this feature, the following client-side methods are used:
1. WebDrillDown uses the following client-side method for selected button changes:
function cwddOnSelectionChange(controlId, selectedIndex, selectedValue)
The parameters are:
- controlId - the control identifier of the WebDrillDown instance.
- selectedIndex - the zero-based index of the button being selected.
- selectedValue - the current value for the button being selected.
2. WebDrillDown uses the following client-side method for button value changes:
function cwddOnValueChange(controlId, selectedIndex, selectedValue)
The parameters are:
- controlId - the control identifier of the WebDrillDown instance.
- selectedIndex - the zero-based index of the button being changed.
- selectedValue - the new value for the button being changed.
These are callback methods that need to be implemented by you if you are interested in either of these events.
WebDrillDown will automatically detect the presence of either method, and call it whenever the change occurs.
These methods do not expect a return value.
This sample implements both methods and responds to the change by displaying the zero-based index and text value of the currently selected button.
In this sample the WebDrillDown is allowing you to select an employee, organized by project and group membership.
Clicking the "Submit" button will display the full path for your selection below:
Click the "Reset" link to clear your selection.