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

DataForm Object

The RadDataForm control provides the following client-side events and methods.

RadDataForm Properties

PropertyParametersReturn TypeDescription
get_dataSource()ArrayGets the data source javascript array of RadDataForm
set_dataSource()ArraySets the data source of RadDataForm
get_isDataBinding()BooleanIndicates whether RadDataForm is currently databinding on the client-side
get_isItemInserted()BooleanGets a value indicating whether the insert form is currently shown
get_pageCount()NumberGets the page count in RadDataForm
get_currentPageIndex()NumberGets the current page index in case paging for RadDataForm is enabled
set_currentPageIndex()NumberSets the current page index in RadDataForm
get_virtualItemCount()NumberGets the total number of items RadDataForm can bind to. This value is used for page calculations.
set_virtualItemCount()NumberSets the virtual item count in RadDataForm
get_uniqueID()StringGets the unique id of the RadDataForm container
get_skin()StringGets the skin set to RadDataForm
get_clientSettings()ObjectGets the current client settings applied for RadDataForm

RadDataForm Methods

MethodParametersReturn TypeDescription
dataBind()Databinds the RadDataForm when the client-side data source is set
rebind()Rebinds RadDataForm to its given data source
editItem(itemIndex)NumberSwitches RadDataForm item into edit mode (with index specified as an argument).The method takes the following argument:itemIndex: Index of the item that will be edited
updateItem(itemIndex)NumberUpdates RadDataForm item (with index specified as an argument).The method takes the following argument:itemIndex: Index of the edited item that will be updated
deleteItem(itemIndex)NumberDeletes RadDataForm item with index specified as an argument.The method takes the following argument:itemIndex: Index of the item that will be deleted
cancelUpdate(itemIndex)NumberCancels RadDataForm item update (with index specified as an argument).The method takes the following argument:itemIndex: Index of the edited item for which update operation will be aborted
showInsertItem(insertItemPosition)NumberDisplays the insert form of RadDataForm .The method takes the following argument: insertItemPosition. The position of the insert item relative to the rest of the items in RadDataForm . Accepted values enumerated in Telerik.Web.UI.RadDataFormInsertItemPosition - .FirstItem, .LastItem, .None.
insertItem()Inserts a new item in RadDataForm with values taken from its insertion form
cancelInsert()Cancels insert operation and hides RadDataForm insertion form
page(command, doNotFireCommand)String, BooleanNavigates RadDataForm to the page specified as an argument. If server-side databinding is used, RadDataPager should be used for page navigation.The method takes the following arguments:command: The actual page to which the user will be navigated. Possible values are 'First', 'Prev', 'Next', 'Last' and numeric values.doNotFireCommand: Optional. Indicates whether RadDataForm should prevent firing the Page command. By default, Page command is fired.
fireCommand(commandName, commandArgument)String, StringFires command with command name and command argument specified as arguments.The method takes the following arguments:commandName: The name of the command that will be executed.commandArgument: The command argument with which the command will be executed.