Asked By mark.parson
28-Feb-07 06:03 PM

Hi Tom,
The reason that you see the difference in behavior between a ListViewWebPart
in the AllItems.aspx page vs. a ListViewWebPart that you add to a web page is
because there are web part properties such as the ListViewXML property that
are set differently.
The ListViewXML property contains CAML that defines the view. When you
create a custom list or library, SharePoint generates a list view web part
for you, named after your custom list. It also automatically sets the
ListViewXML property for the web part with CAML that describes how to display
your list as you see it when you add the part to a page. This automatic
configuration does not include the drop down and other nice features that the
web part on the AllItems.aspx includes. The list view web part on the
AllItems.aspx page contains CAML that includes the features such as the drop
down list with different views.
SharePoint gives you no user interface to manipulate this CAML besides that
you can do by modifying a view, which is not much. You can directly edit the
ListViewXML from the tag properties panel, but to do anything sophisticated
using this technique would be extremely difficult.
You might try copying the ListViewWebPart definition from the AllItems.aspx
page to your new ListViewWebPart.
You could also convert I would suggest that you convert the ListViewWebPart
on the AllItems.aspx page to a DataView and copy that. This is what I would
do, since all of the CAML gets converted to XSLT which can be manually
changed to do whatever you like.
Hope this helps - mark
--
_______________________________
Mark Parsons | Cofounder, Architect
Distributed Logic Corp.
mark.parsons@distributedlogic.com Team Blog:
http://www.sharepointplatform.com/teamblog