Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

DataView WebPart won't hold state properly

  Asked By: Lukas    Date: Sep 26    Category: Sharepoint    Views: 912

I've followed the example found here: wss.collutions.com/Lists/FAQ/DispForm.aspx?ID=202 to create a few connected dataviews on a page that are filtered through Drop Down lists.

such that I have 3 DVWPs:
1. DropDown Style of Categories
2. DropDown Style of SubCategories
3. Normal table layout style of Documents

When I select an item in the first box, it fires the connection to the second and the second shows the filtered list of subcategories, but the first box has gone back to "Choose One..." If I select a SubCategory, the connection fires and the 3rd DVWP of Documents is filtered correctly, but the 2nd Drop Down also goes back to "Choose One.." If I then perform any sort of post-back such as sorting the 3rd DVWP the data reverts back to as if I had not selected anything in the dropdowns. I thought it may have something to do with the first record being sent automatically by the WebPart, but the behavior is basically the same whether this option is checked or not. Is there any way to make the DataView hold onto the selections I've made so that the connected webparts contain the correct data?

BTW.. this behaviour is the same no matter what style the DVWP's are, which seems to make it almost useless to use DVWP's connected to each other except for when you'll never have a post-back.

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Jasper Hatfield     Answered On: Sep 26

The DVWP is not written to retain the selected  row when another DVWP has
its row selected. I haven't looked into how to alter this behavior  but
it is in line with my experience with the Web Part.

 
Answer #2    Answered By: Rashawn Hopper     Answered On: Sep 26

Hopefully they will write some better handling into the next version!

It appears that if you limit it to 2 DVWP's you are ok.. it's when you add the 3rd  into the mix that the problem arises because the second part no longer has the context from the first.

 
Didn't find what you were looking for? Find more on DataView WebPart won't hold state properly Or get search suggestion and latest updates.




Tagged: