No post back Web Part connection using the DataSheet View

Maybe you haven’t seen this trick before so I figured I would serve it up to you for a weekend thing to try. Create a DataSheet view of two lists and with some field to connect them together, drop them onto a page and add connection information to link the fields together. You’ll have a dynamic view that doesn’t post back to the page and filters information from one list to the other like this:

Click to see full size image

Normally when you connect two Web Parts together (say through an ID field of some kind) you’ll have a radio button on one that, when clicked, will cause a post back to the page and filter the second list. Here we’re doing the same thing but instead of using the Standard SharePoint view, we’re using a DataSheet View.

I created two lists (by exporting the Northwind from Microsoft Access to a SharePoint site, another trick that you can do if you want some quick data), one for Suppliers and one for Products. The Products list has a column called SupplierID which matches the ones found in the Supplier list. Then I created two DataSheet Views for the lists and put them on a Web Part Page (in this case, the home page). Note that your clients will need Office 2003 installed in order to view this.

Connect the two lists as you would normally, having Products provide a row to Suppliers via the SupplierID column. That’s all there is to it. Now when you select a Supplier from the list, it filters the available Products. No post backs, no fuss. Give it a try with your lists.

Enjoy!

Published Friday, February 24, 2006 9:12 PM by Bil Simser
Filed under:

Comments

# re: No post back Web Part connection using the DataSheet View

Saturday, February 25, 2006 4:39 AM by MikeWalshHelsinki
Nice, Bil. I never thought of using Datasheet View when connecting web parts.

# re: No post back Web Part connection using the DataSheet View

Monday, February 27, 2006 8:43 AM by Mark Kruger, SharePoint MVP
Bil, very nice job! I can honestly say that I had not used Data Sheet views and web part connections before. Nice post!

# re: No post back Web Part connection using the DataSheet View

Thursday, March 02, 2006 10:50 AM by Eric Legault (MVP - Outlook)
Unreal - awesome tip. Keep 'em coming Bill!

# re: No post back Web Part connection using the DataSheet View

Friday, March 03, 2006 3:39 AM by Serge van den Oever [Macaw]
Good one! Is it also possible to have a web part connected to the datasheet view using client side web part connections? Then we could create more advanced controls like treeviews to drive the datashet views.

# No post back Web Part connection using the DataSheet View

Wednesday, June 28, 2006 1:58 PM by SharePointKicks.com
Trackback from SharePointKicks.com

# re: No post back Web Part connection using the DataSheet View

Thursday, September 09, 2010 7:48 PM by Subba Rao Malisetti

The solutions was good, but I wanted to pass the filters from Listview web part to Datasheet view webpart. This two webparts unable to connect each other due to grayedout the connections property in SPD. Is ther any way to make it happen?

Thanks & Regards,

Subba-

Leave a Comment

(required) 
(required) 
(optional)
(required)