SharePoint Developer Center >
SharePoint Products and Technologies Forums
>
SharePoint - Design and Customization
>
How to wire a connection between 2 web parts
How to wire a connection between 2 web parts
- Hello,
I have 2 web parts on a page. One web part displays Invoices filetered by user and the other web part (Line Items) displays a list of invoices for the invoice selected in the Invoices list. See image below:
My question is:
Can someone point me in the direction (via link or suggestion) as to how I can wire the Invoice Number in the first list to be a link that when clicked will display the associated Line Items in the list below.
Current Status:
I have setup the relationship between the two web parts such that the Line Items web part is looking for the Invoice number from the Invoice list above. I just need to figure out how to wire the Invoice number to initiate an OnClick event to send that value to the Line Items List.
Thank you for your help.
Sincerely,
Tim
Answers
- Is there a requirement that second list mus be shown as Data Sheet View? If not, then simple web part connection (http://office.microsoft.com/en-us/sharepointserver/HA100241051033.aspx) could be a solution for you. If second list must be in Data View, then it looks like there is no simple solutions (or at least it is not known for me ;).
Why are you looking at me?
http://www.sharepointdrive.com- Marked As Answer byGuYumingMSFT, ModeratorFriday, November 13, 2009 2:54 AM
- Well, again not direct answer ;) - standard list views have Totals section where you can select columns to calculate count or sum of their values.If you need some xsl, here is example (you just need to place in some right place):<tr><td class="ms-vb">Total : <xsl:value-of select="sum(/dsQueryResponse/Rows/Row/@Price)" /></td></tr>If you still want to use XSL, this article may help you: http://community.bamboosolutions.com/blogs/bambooteamblog/archive/2009/04/24/how-to-total-calculated-columns-in-a-sharepoint-list.aspx
Do not press -> http://www.sharepointdrive.com- Marked As Answer byGuYumingMSFT, ModeratorFriday, November 13, 2009 2:54 AM
- Hi Tim,
You can refer this link... to pass data between two web parts-
http://avinashkt.blogspot.com/2007/06/communication-between-web-parts.html
Regards, Avinash | avinashkt.blogspot.com- Marked As Answer byGuYumingMSFT, ModeratorFriday, November 13, 2009 2:54 AM
All Replies
- Is there a requirement that second list mus be shown as Data Sheet View? If not, then simple web part connection (http://office.microsoft.com/en-us/sharepointserver/HA100241051033.aspx) could be a solution for you. If second list must be in Data View, then it looks like there is no simple solutions (or at least it is not known for me ;).
Why are you looking at me?
http://www.sharepointdrive.com- Marked As Answer byGuYumingMSFT, ModeratorFriday, November 13, 2009 2:54 AM
- Hi Sigis,
I was able to create the view as you indicated however once of things missing in this setup is the ability to sum the columns with numberic values inside of them. So I then try to modify the web part however I only have the ability to access the XSL for the web part.
Do you know if there is a way to modify the XSl to sum specified columns? I'm not an XSL guy but need to provide this type of view.
Thank you for any help you can provide.
Sincerely,
Tim - Well, again not direct answer ;) - standard list views have Totals section where you can select columns to calculate count or sum of their values.If you need some xsl, here is example (you just need to place in some right place):<tr><td class="ms-vb">Total : <xsl:value-of select="sum(/dsQueryResponse/Rows/Row/@Price)" /></td></tr>If you still want to use XSL, this article may help you: http://community.bamboosolutions.com/blogs/bambooteamblog/archive/2009/04/24/how-to-total-calculated-columns-in-a-sharepoint-list.aspx
Do not press -> http://www.sharepointdrive.com- Marked As Answer byGuYumingMSFT, ModeratorFriday, November 13, 2009 2:54 AM
- Hi Tim,
You can refer this link... to pass data between two web parts-
http://avinashkt.blogspot.com/2007/06/communication-between-web-parts.html
Regards, Avinash | avinashkt.blogspot.com- Marked As Answer byGuYumingMSFT, ModeratorFriday, November 13, 2009 2:54 AM
- Could you please kindly share with us how do you setup the relationship between the two web parts?


