Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1465
Add multiple images client-side
posted

Hello.

I looked at your example where you added one image to a WebImageViewer on the client.

I need to add several.

My code, below, will try to add three items, but only one actually gets added.

Variable "iv" is the WebImageViewer control.

I'm using IG 11.2 Ultimate.

Please advise.

Thank you,

Mike

 

 

 

var items = iv.get_items();

 

 

for (i = 0; i < result.length; i++) {

 

 

var item = items.createItem();

item.set_imageUrl(

 

"~/snapshot.aspx?uiid=" + result[i].UIID);

item.set_altText(result[i]._Description);

item.set_tooltip(result[i]._Description);

item.set_key(result[i]._MACAddress);

items.add(item);

}

  • 8160
    posted

    Hello Mike,

    use addRange function

    http://community.infragistics.com/forums/p/19444/70269.aspx

                var items = iv.get_items();

     

                var newItems = new Array();

                for (var i = 0; i < result.length; i++) {

                    var item = items.createItem();

    item.set_imageUrl("~/snapshot.aspx?uiid=" + result[i].UIID);

    item.set_altText(result[i]._Description);

    item.set_tooltip(result[i]._Description);

    item.set_key(result[i]._MACAddress);

                    newItems[i] = item; //add(item);

                }

     

                items.addRange(newItems);

     

  • 8160
    posted

    Hi Mike,

    this looks like a development issue. I will test this and will let you know what is the result.

    Thank you for your patience