Version

UploadModel Class Members

The following tables list the members exposed by UploadModel.

Public Constructors
 NameDescription
Public ConstructorUploadModel Constructor  
Public Properties
 NameDescription
Public PropertyAllowedExtensionsSets the allowed file extensions. When this array is empty no such validation is made.  
Public PropertyAutoStartUploadSets whether the file start upload automatically when it is selected. Default is false.  
Public PropertyClientEventsSet implementations of client events raised by a widget.

Event handler assumes 2 parameters: 1st parameter has name "evt" and 2nd parameter has name "ui". To get information about member variables available for "ui" parameter, please consult documentation of a widget and its events.

Examples:

1. Full implementation:

new Dictionary<string, string> { { "dropDownOpening", "function(evt,ui){alert('drop:'+ui.owner);}" } }

2. Content of inline function:

new Dictionary<string, string> { { "dropDownOpening", "alert('drop:'+ui.owner);" } }

3. Name of global function:

new Dictionary<string, string> { { "dropDownOpening", "nameOfGlobalFunction" } } Note:

Instead of explicit key-strings, which represent name of event exposed by a widget, the event-constants defined by a particular control can be used.

Example:

new Dictionary<string, string> { { ComboClientEvents.DropDownOpening, "nameOfGlobalFunction" } } (Inherited from Infragistics.Web.Mvc.ModelWidgetBase)
Public PropertyControlIdSets the uniqueId of the control.  
Public PropertyErrorMessageAJAXRequestFileSizeSets error message when AJAX Request to get file size throws error.  
Public PropertyErrorMessageCancelUploadSets the error message shown when the ajax call that sends the cancel upload command throws an error.  
Public PropertyErrorMessageGetFileStatusSets the error message shown when the ajax call that gets the file status throws an error.  
Public PropertyErrorMessageMaxFileSizeExceededSets the error message shown when the size of the uploaded file exceeds the maximum file size.  
Public PropertyErrorMessageMaxSimultaneousFilesSets error message when maximum simultaneous files is less or equeal to 0.  
Public PropertyErrorMessageMaxUploadedFilesSets error message when maximum allowed files exceeded.  
Public PropertyErrorMessageNoSuchFileSets the error message shown when the file is not found.  
Public PropertyErrorMessageOtherSets the error message for other errors  
Public PropertyErrorMessageValidatingFileExtensionSets error message when file extension validation failed.  
Public PropertyFileExtensionIconsSets the css classes for icons.  
Public PropertyFileSizeDecimalDisplaySets the number of digits after the decimal point.  
Public PropertyFileSizeMetricSets the unit to be used for the file size metric.  
Public PropertyHeightSets the height of the main container of the upload. The main container contains all buttons, progressbar, etc.  
Public PropertyHtmlAttributesSets custom attributes of the div on which the Upload widget will be created.  
Public PropertyIDSets the ID of the div on which the Upload widget will be created.  
Public PropertyLabelAddButtonSets the label for the browse button in the main container.  
Public PropertyLabelClearAllButtonSets the label for summary Clear all button. It will be shown only in muliple upload mode.  
Public PropertyLabelHideDetailsSets the label for show/hide details button when main container is shown.  
Public PropertyLabelProgressBarFileNameContinueSets the filename that will be shown when the name is must be shorten  
Public PropertyLabelShowDetailsSets the label for show/hide details button when main container is hidden.  
Public PropertyLabelSummaryProgressBarTemplateSets the template for showing uploading information in summary progress bar. It will be shown only in multiple upload mode. $0 uploaded filesize. $1 - total file size.  
Public PropertyLabelSummaryProgressButtonCancelSets the label for cancelling all files. Shown only in multiple upload mode.  
Public PropertyLabelSummaryProgressButtonContinueSets the label for start upload batch files. Shown only in multiple upload mode and autostartupload is false.  
Public PropertyLabelSummaryProgressButtonDoneSets the label when upload is finished. Shown only in multiple upload mode.  
Public PropertyLabelSummaryTemplateSets the template for showing summary template. $0 is count of uploaded files. $1 is total count of file to be uploaded.  
Public PropertyLabelUploadButtonSets the label for the first shown browse button. When file is selected for the first time this button is hidden.  
Public PropertyLanguageGets/sets Language the control (Inherited from Infragistics.Web.Mvc.Framework.LocalizationBaseModel)
Public PropertyLocaleGets/sets the Locale of the control (Inherited from Infragistics.Web.Mvc.Framework.LocalizationBaseModel)
Public PropertyMaxFileSizeGets or sets the maximum size(in bytes) allowed for the file to be uploaded. If it is set to null or -1 there is no limitation otherwise if the size(of the selected file) exceeds this value it is not allowed to be uploaded. This option is used for validation only on client side and only if the browser supports HTML5 file API and share information about the file size  
Public PropertyMaxSimultaneousFilesUploadsSets the number of files that could be uploaded at the same time.  
Public PropertyMaxUploadedFilesSets the maximum number of allowed files to upload.  
Public PropertyModeSets whether the widget is multiple or single upload.  
Public PropertyMultipleFilesGet or set a bool setting that allows user to select(for upload) more than 1 file from the browse dialog at once. HTML 5+ - it is supported by Chrome, MOzilla FF, Safar, Opera latest versions and IE10+  
Public PropertyProgressUrlSets the URL of HTTPHandler to get information about upload, current size and also to get commands.  
Public PropertyRegionalGets/sets the Regional of the control (Inherited from Infragistics.Web.Mvc.Framework.LocalizationBaseModel)
Public PropertyShowFileExtensionIconSets whether to show File Extension icon.  
Public PropertyUploadUrlSets the URL for uploading.  
Public PropertyWidthSet the width of the main container of the upload. The main container contains all buttons, progressbar, etc.  
Protected Properties
 NameDescription
Protected PropertyStoreReturn the store with all of the options (Inherited from Infragistics.Web.Mvc.ModelBase)
Public Methods
 NameDescription
Public MethodAddClientEventAdds javascript function to process client event of widget. (Inherited from Infragistics.Web.Mvc.ModelWidgetBase)
Public MethodToJsonSerializes the object to JSON. (Inherited from Infragistics.Web.Mvc.ModelBase)
Protected Methods
 NameDescription
Protected MethodCamelizeConverts the provided string to camel case. (Inherited from Infragistics.Web.Mvc.ModelBase)
Protected MethodEnsureClientEventsAdds client events to Serializes the internal model store into json. (Inherited from Infragistics.Web.Mvc.ModelWidgetBase)
Protected MethodGetBoolGets the value of a bool property of the model. (Inherited from Infragistics.Web.Mvc.ModelBase)
Protected MethodGetCharSets the value of a char property of the model. (Inherited from Infragistics.Web.Mvc.ModelBase)
Protected MethodGetDateTimeGets the value of a DateTime property of the model. (Inherited from Infragistics.Web.Mvc.ModelBase)
Protected MethodGetDoubleGets the value of a double property of the model. (Inherited from Infragistics.Web.Mvc.ModelBase)
Protected MethodGetIEnumerable<T>Gets the value of an IEnumerable property of the model. If the value is null a new IEnumerable of type T will be created. (Inherited from Infragistics.Web.Mvc.ModelBase)
Protected MethodGetIntGets the value of an int property of the model. (Inherited from Infragistics.Web.Mvc.ModelBase)
Protected MethodGetJSLiteralSets the value of a literal property of the model. (Inherited from Infragistics.Web.Mvc.ModelBase)
Protected MethodGetLongGets the value of a long property of the model. (Inherited from Infragistics.Web.Mvc.ModelBase)
Protected MethodGetModel<T>Gets the value of an IModel property of the model. If the value is null a new model of type T will be created. (Inherited from Infragistics.Web.Mvc.ModelBase)
Protected MethodGetStringGets the value of a string property of the model. (Inherited from Infragistics.Web.Mvc.ModelBase)
Protected MethodGetStringEnum<T>Gets the value of a string property whose values are the lowercase values of an Enum. (Inherited from Infragistics.Web.Mvc.ModelBase)
Protected MethodGetValue<T>Gets a property value of arbitrary type. (Inherited from Infragistics.Web.Mvc.ModelBase)
Protected MethodGetValueModel<T>Gets the value of an IModel property of the model. (Inherited from Infragistics.Web.Mvc.ModelBase)
Protected MethodJsonFromBoolSerializes a bool object into json. (Inherited from Infragistics.Web.Mvc.ModelBase)
Protected MethodJsonFromDateTimeSerializes a DateTime object into json Date object. (Inherited from Infragistics.Web.Mvc.ModelBase)
Protected MethodJsonFromDoubleSerializes a double object into json. (Inherited from Infragistics.Web.Mvc.ModelBase)
Protected MethodJsonFromFloatSerializes a float object into json. (Inherited from Infragistics.Web.Mvc.ModelBase)
Protected MethodJsonFromIDictionarySerializes an IDictionary of objects into json. (Inherited from Infragistics.Web.Mvc.ModelBase)
Protected MethodJsonFromIEnumerableSerializes an IEnumerable object into json. (Inherited from Infragistics.Web.Mvc.ModelBase)
Protected MethodJsonFromIntSerializes an int object into json. (Inherited from Infragistics.Web.Mvc.ModelBase)
Protected MethodJsonFromModelStoreSerializes the internal model store into json. (Inherited from Infragistics.Web.Mvc.ModelWidgetBase)
Protected MethodJsonFromObjectSerializes an arbitrary object in json using the typed serialization methods. (Inherited from Infragistics.Web.Mvc.ModelBase)
Protected MethodJsonFromStringSerializes a string object into json string, escaping all single quotes. (Inherited from Infragistics.Web.Mvc.ModelBase)
Protected MethodSetBoolSets a value to a bool property of the model. (Inherited from Infragistics.Web.Mvc.ModelBase)
Protected MethodSetBrush (Inherited from Infragistics.Web.Mvc.ModelBase)
Protected MethodSetCamelizedStringEnum<T>Sets the value of a string property whose values are the lowercase values of an Enum. (Inherited from Infragistics.Web.Mvc.ModelBase)
Protected MethodSetCharGets the value of a char property of the model. (Inherited from Infragistics.Web.Mvc.ModelBase)
Protected MethodSetDateTimeSets a value to a DateTime property of the model. (Inherited from Infragistics.Web.Mvc.ModelBase)
Protected MethodSetDoubleSets a value to a double property of the model. (Inherited from Infragistics.Web.Mvc.ModelBase)
Protected MethodSetIEnumerable<T>Sets a value to an IEnumerable property of the model. (Inherited from Infragistics.Web.Mvc.ModelBase)
Protected MethodSetIntSets a value to an int property of the model. (Inherited from Infragistics.Web.Mvc.ModelBase)
Protected MethodSetJSLiteralGets the value of a literal property of the model. (Inherited from Infragistics.Web.Mvc.ModelBase)
Protected MethodSetLongSets a value to a long property of the model. (Inherited from Infragistics.Web.Mvc.ModelBase)
Protected MethodSetModel<T>Sets a value to an IModel property of the model. (Inherited from Infragistics.Web.Mvc.ModelBase)
Protected MethodSetStringSets a value to a string property of the model. (Inherited from Infragistics.Web.Mvc.ModelBase)
Protected MethodSetStringEnum<T>Sets the value of a string property whose values are the lowercase values of an Enum. (Inherited from Infragistics.Web.Mvc.ModelBase)
Protected MethodSetValue<T>Sets a property value of arbitrary type. (Inherited from Infragistics.Web.Mvc.ModelBase)
Protected MethodTransformDataTransforms the data. (Inherited from Infragistics.Web.Mvc.ModelBase)
Protected MethodValidValueType<T>Checks type for value of existing property. Returns false as well if non existing property. (Inherited from Infragistics.Web.Mvc.ModelBase)
See Also

View on GitHub