RadControls for ASP.NET AJAX The visibility of the RadUpload UI elements is controlled by the
ControlObjectsVisibility property. You can optionally show or hide any of the elements
(other than the file input area):
The check box for selecting rows appears if ControlObjectsVisibility
includes "CheckBoxes".
The Clear button appears on each row if ControlObjectsVisibility
includes ""ClearButtons"
The Remove button appears on each row if ControlObjectsVisiblity
includes "RemoveButtons".
The Add button for adding rows appears if ControlObjectsVisibility
includes "AddButton"
The Delete Selected button appears if ControlObjectsVisibility
includes "DeleteSelectedButton".
Most of the RadUpload UI elements are for letting the user add and remove rows to change the number of files
that are uploaded. Two properties let you control the number of rows:
The InitialFileInputsCount property determines the number of rows that appear when the
RadUpload control is first loaded.
The MaxFileInputsCount property specifies the maximum number of rows that can appear in the
RadUpload control. Once the RadUpload control contains this number of rows, the Add button is disabled until a row
is deleted. Here you can find out how to implement minimum file inputs count.
By default, the user can enter select a file either by typing in the file input area or by clicking the Select
button and picking a file using a file browser. You can prevent users from typing directly in the file input area, requiring them to select files
using the browser, by setting the ReadOnlyFileInputs property to true.
Example
The following example shows a RadUpload control with three input areas. The MaxFileInputsCount
property sets this as a maximum. The ControlObjectsVisibility property is set to include all controls except the check
boxes for selecting rows and the delete button that deletes buttons selected this way:
CopyASPX
<telerik:radupload runat="server" id="RadUpload1" initialfileinputscount="3" maxfileinputscount="3"
controlobjectsvisibility="RemoveButtons,ClearButtons,AddButton" />
When assigning the ControlObjectsVisibility property at runtime, use the "or" operator to combine values:
CopyC#
RadUpload1.ControlObjectsVisibility = ControlObjectsVisibility.RemoveButtons |
ControlObjectsVisibility.ClearButtons |
ControlObjectsVisibility.AddButton;
CopyVB.NET
RadUpload1.ControlObjectsVisibility = _
ControlObjectsVisibility.RemoveButtons Or _
ControlObjectsVisibility.ClearButtons Or _
ControlObjectsVisibility.AddButton
See Also