RadControls for ASP.NET AJAX
The OnClientAdded client-side event occurs when a new row has just been added to
the RadUpload control.
Note |
|---|
This event occurs for the initial rows that are added when the RadUpload control is
first loaded, as well as any rows added in response to the Add button or client-side
methods such as addFileInput().
|
The event handler receives two parameters:
The instance of the RadUpload control firing the event.
An eventArgs parameter containing the following method:
get_row returns the row that was just added.
get_rowIndex returns the index of the row
get_fileInputField returns the input element of the row (<INPUT> element)
Use the OnClientAdded event to perform any last minute changes to the rows in the
RadUpload control. This is the point at which you should add controls for
custom fields.
The following example shows how to use the OnClientAdded event to add child controls in a
different order than the one that arises from using the ControlObjectsVisibility property:
CopyASPX
<script type="text/javascript">
function addControls(upload, args) {
var row = args.get_row();
source.appendClearButton(row);
source.appendCheckBox(row);
source.appendRemoveButton(row);
}
</script>
<telerik:radupload id="RadUpload1" runat="server"
controlobjectsvisibility="AddButton, DeleteSelectedButton"
onclientadded="addControls" />
See Also