Who is afraid of ADC? - Introduction to AJAX Data Controls - Part III
ADC controls actually does not need much introduction. Repeaters, Gridviews, DataLists, we knew them since the onset of ASP .net. And the ADC development team has deliberately made it easy for the transition from server side data-bound controls to client-side AJAX script controls.
However, little known about ADCs is that they are also equipped with a set of behaviors to make the control cool and cooler. Behaviors are predefined client funcationalities associated with one or more DOM elements.The list of client-side behaviors include:
- CalendarBehavior: used as a cool datetime picker
- DropShadowBehavior: used to attach a drop shadow to an element
- FilteredTextBoxBehavior: used to filter out unwanted input characters
- MaskedEditBehavior: apply a "mask" to the input that permits only certain types of characters/text to be entered. The supported data formats are: Number, Date, Time, and DateTime
- ModalPopupBehavior: display a pop up box, in a modal form rather than alert
- NumericUpDownBehavior: add a up/down box to a text control to allow auto-increase or autodecrease numbers
As you may have noticed, most of the behaviors are also part of the AJAX control toolkit. However, the ADC team has tweaked them to work with the ajax data controls.
Screen Shot 1: CalendarBehavior used in conjunction with Gridview.
Screen Shot 2: Using a modal popup on deleteEvent
All the behaviors scripts together with sample .aspx pages can be downloaded at http://www.codeplex.com/AjaxDataControls/SourceControl/ListDownloadableCommits.aspx