ImageGear.Web.UI Namespace Client API Library > ImageGear.Web.UI Namespace > ImGearDocumentCollection class : addDocument Method |
ASP.NET Ajax Javascript (Specification) | |
---|---|
function addDocument( imGearDocument : ImGearDocument ) : (Any); |
ASP.NET Ajax Javascript (Usage) | |
---|---|
var resultVar = instanceOfImGearDocumentCollection.addDocument(ImGearDocument); |
This function will append the ImGearDocument object passed in as the parameter to the collection. This function is similar to the standard JavaScript Array.push() function.
After this function has added the new imGearDocument to the collection, it will raise the documentAdded event. The event argument contains the imGearDocument object added.
Note: When adding a new document to the collection, make sure that the new document does not contain a duplicated instance of a ImGearPage object in the document's page collection ImGearPageCollection, ImageGear.Web.UI.ImGearPageCollection.addPage property for details.
This collection is used within the ImGearThumbnailList control