New to Telerik UI for ASP.NET AJAXStart a free 30-day trial

Client-side Programming Overview

RadLightBox for ASP.NET AJAX offers a rich Client-Side API that allows you to control the look andthe behavior of the control on the client with JavaScript.

RadLightBox Properties

RadLightBox exposes the following client-side properties:

PropertyDescription
show()Shows the LightBox control
hide()Hides the LightBox control
next()Navigates to the next page/image
prev()Navigates backward to the previous page/image
first()Shows the first page/image
last()Shows the last page/image
get_items()Returns a collection of RadLightBox items
get_currentItemIndex()Returns a number represents the current index of the Item
get_loopItems()Returns a boolean variable which shows whether the slide show will begin from the start page after the last one has been reached
get_modal()Returns a boolean variable which shows whether the window will close when click outside of the container
get_navigationMode()Returns a value which represents the chosen navigation mode
showCloseButton()Determines whether the close button will be displayed in the LightBox
showNextButton()Determines whether the next button will be displayed in the LightBox
showPrevButton()Determines whether the previous button will be displayed in the LightBox

RadLightBox Methods

RadLightBox provides the following client-side methods:

MethodDescription
navigateTo(itemIndex)A method which navigate to an item having the provided index
set_loopItems(boolean)Determines whether the slide show will begin from the start page after the last one has been reached
set_currentItemIndex(index)A method which set an index to the current item.
set_modal(boolean)Accepts true or false as an argument. When its enable the window can be closed by clicking outside of its frame.
set_navigationMode(mode)A method which accept an enumeration value. You could pass on of the following values Telerik.Web.UI.LightBoxNavigationMode.Button or Telerik.Web.UI.LightBoxNavigationMode.Zone.
set_animation(animationType)A method which accept an enumeration value. You could pass on of the following values Telerik.Web.UI.LightBoxAnimationType.(Fade, Resize, None)

RadLightBox Events

RadLightBox provides the following client-side events:

EventDescription
OnShowingFires before opening the LightBox popup
OnShowedFires when the popup is opened
OnClosingFires before closing the LightBox popup
OnClosedFires when the popup is closed
OnNavigatingFires when the user navigates out of the current page
OnNavigatingFires when the user navigates out of the current page
OnDestroyingFires before disposing the control
OnLoadFires when the control is loaded