Occurs when an error happens when the viewer tries to update the item image data.
Object.defineProperty(ImageViewer.prototype,'itemError',
get: function(),
set: function(value)
)
function itemError.add(function(sender, e));
function itemError.remove(function(sender, e));
itemError: void;
An error might occur if the image viewer is updating the image data of any of the items asynchronously or outside direct user programmatic interaction (such as during the drop part of a drag/drop operation). These operations do not occur from the user code (drop) or occur at a later time after they have been initiated (loading images asynchronously), therefore, the user must attach a handler to the ItemError event to be able to handle these errors.
When value of ImageViewerItem.Url is set to a new value, the image viewer will create a new HTML image
element and use it to load the image data asynchronously using load
and error
events. This can be trigger by any of the following:
ImageViewerItems.AddFromUrl is called
ImageViewerItems.InsertFromUrl is called
ImageViewerItems.UpdateUrl is called
ImageViewerItem.Url is set to a new value
ImageViewer.ImageUrl is set to a new value
If an error occurs, it fires the ItemError event will fire with the following values set in ImageViewerItemErrorEventArgs:
Member | Value |
---|---|
Item | The item that triggered the error |
Reason | |
Data |
Set to the HTML image element used internally by the viewer to load the data.
|
Error | The error object |
RemoveEmptyItem | Set to true to automatically remove this item if it did not have previous data. |
When an image or file system item is dragged and dropped over the viewer and AllowDrop was set true, the viewer will try to automatically update or add a new item and load the new image data into it. An error might occur at this point and if so, the ItemError event will fire with the following values set in ImageViewerItemErrorEventArgs:
Member | Value |
---|---|
Item | The item that triggered the error |
Reason | |
Data | Set to the instance of ImageViewerItemDragDropEventArgs being used. |
Error | The error object |
RemoveEmptyItem | Set to true to automatically remove this item if it did not have previous data. |
For an example, refer to ItemChanged.
Parameter | Type | Description |
---|---|---|
sender | var | The source of the event. |
e | ImageViewerItemErrorEventArgs | The event data. |
Products |
Support |
Feedback: itemError Event (ImageViewer) - Leadtools.Controls |
Introduction |
Help Version 19.0.2017.3.21
|
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.