Santhosh - Friday, March 18, 2011 4:57 AM:
Hi All.
I'm trying to get the list of selected items from a relationship grid of an item.
I found the below javascript to get the list of selected items.
var grid = top.relationships.frames[0].grid;
var strSelectedItems = grid.GetSelectedItemIDs("|");
alert(strSelectedItems);
Could any one please suggest how to do the same with VB.
Santhosh
Brian - Sunday, March 20, 2011 5:31 AM:
Hi Santhosh,
If you are using VB then you are in the server. You don't have access to the client windows from the server so you can't do this the way you are trying.
It really depends what you are trying to do with the information but it sounds like you want to use a VB method in the onBeforeAdd or onAfterAdd or the onBeforeGet or onAfterGet events.
If so then you have the full document including all of the relationships available to you via the "Me" context item of the method. You then retrieve the relationship items using standard AML.
If this doesn't help please post some information on what you are trying to actually do and we can have a look and suggest a method based on this information.
Cheers,
Brian.
Santhosh - Monday, March 21, 2011 2:18 AM:
Hi Brain,
What I'm trying to do is.
I have an Item and it has some related items. when I select few items in the relationship grid of the item. I should be able to pass the Item IDs of the selected related items and have some business logic to do.
Please let me know if I'm not clear.......
Thanks
Santhosh
vishal_trivedi - Monday, March 21, 2011 8:43 AM:
Hi Santhosh,
What do you want to perform on those items ??
It might be possible to do the same thing with Javascript..
So, please explain it I can suggest something for that.
Vishal
Santhosh - Tuesday, March 22, 2011 1:40 AM:
Hi Vishal,
I need to read data from the selected items and format an XML and display in a report.
I do not have much idea on Java script bcoz I'm a VB guy....
Please suggest a way.
Thanks
Santhosh
Santhosh - Wednesday, March 23, 2011 6:33 AM:
I got the solution for this. I'm using javascript to collect the selected items and call server method to do my requirement.
Thanks everybody for help.
rneuber1 - Friday, May 20, 2011 3:12 AM:
Would you like to share your solution with us, since this may be interesting for other people, too.
Thanks!
Ralf