We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Iterate through selected objects

Thread ID:

Created:

Updated:

Platform:

Replies:

119250 May 29,2015 01:02 AM UTC May 29,2015 12:52 PM UTC ASP.NET Web Forms 1
loading
Tags: Diagram
Jim Jacobs
Asked On May 29, 2015 01:02 AM UTC

Hi,

Until recently I have been using the following statement to iterate through selected objects:

        for (var i = 0; i < diagram.model.selectedItems.children.length; i++) {

It seems that this now yields 0 objects.

Am I now supposed to be using the newItems array which is passed as an argument to the OnClientSelectionChange handler?

I am currently using this only to determine the # of objects selected, including none (a requirement that I asked for earlier).

Please advise on how to proceed.

Thanks

Jim

Shyam G [Syncfusion]
Replied On May 29, 2015 12:52 PM UTC

Hi Jim

Thanks for using Syncfusion products.

Please note that your approach is correct and you can use the newItems to get the selected object, which is passed as an argument to the OnClientSelectionChange handler. If we unselect the selected object, then the newItems will be empty and it will be added in the oldItems. Please note that by default selected Object will be added to the selectedItems, once the selection change event is completed and If we set an arg.cancel= true in the OnClientSelectionChange handler , then the selected object will not be added to the selectedItems. We have provided the drafted version of our documentation below for your references

Link:http://www.syncfusion.com/downloads/support/forum/119250/ze/Selection-403391422

Please let me know if any concerns.

Regards,
Shyam G

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;