“Data View Preview” in SharePoint Designer 2010

When editing a data view in SharePoint 2010, using SharePoint Designer 2010, on the <Design> tab, there’s a section called <Preview>.  This title is a little misleading, because there are some pretty powerful options in this section, having to do with inline editing.  Jennifer Mason wrote about “SharePoint 2010- Inline Editing for Views”, which shows how to set up a list or library view with inline editing.  As is apparent, the view does not need to be created in SharePoint Designer in order to use inline editing, it can just be a regular browser view.  In this post, I’ll describe a way to create a data view web part using SharePoint Designer 2010, and some extra functionalities that exist when inline editing is used.

  1. Open the SharePoint 2010 site in SharePoint Designer 2010.
  2. Click “Lists and Libraries” on the left side of the screen, and then click on the name of the list or library to modify.  In this example, the list is called “Sales Report”.
    49-CropperCapture13_28BAE8A4.png
  3. On the right side  of this page, in the Views section, click <New…> to create a new view.  I’m going to be creative and call mine “Custom” and click OK.
    CropperCapture[15]
  4. Then, click the name of the view to edit it.  All list view web parts are data view web parts in SharePoint 2010, so there’s no worry about breaking the page away from the site definition at this point.
    CropperCapture[16]
  5. When any part of the list view in the middle of the page is selected, the contextual ribbon at the top of the page will display the <List View Tools> set of tabs.  On the <Options> tab, click the Inline Editing button.  This toggle button will insert a seemingly empty column into the left side of the list.  Again, Jennifer Mason’s blog shows examples of what inline editing looks like on a list item.
  6. Click on the <Design> tab, and now that inline editing is turned on, there will be a couple of more configurations possible.  In the Preview section of this tab, click the Data View Preview drop-down box.
    CropperCapture[17]
    The Edit Template and Insert Template choices are only available when inline editing is turned on.
    Edit Template – This is the interface that displays in inline edit mode on any individual item in the list.
    Insert Template – This interface is used when the “Plus” CropperCapture[18] icon is clicked to add a new item to the list in an inline fashion.  Editing the insert template will change the way this screen appears.These screens were not easily configurable in SharePoint 2007.
  7. There is another cool new option in this “Data View Preview” section, unrelated to inline editing.  This is the option to edit the ‘No Matching Items’ Template.  Back in the days of SharePoint 2007, when we wanted to change the text displayed when there were no items in a view, we could do only that… edit the text.  An example of a case in which to use this functionality:  There is a lit of tasks, filtered by tasks assigned to the logged in user.  Instead of the default “There are no items to show in this view…”, the text can be changed to something more specific, like “There are currently no tasks assigned to you”.  Now in SharePoint 2010, there’s the ability to edit that whole page that is displayed where there are no items in the view.  In the Data View Preview drop-down box, choose ‘No Matching Items’ Template.
  8. In this example, I edited the text, and also inserted an exclamation mark image.
    CropperCapture[21]

35 comments

  • gkoopman@syntess.nl

    Thank you very much! This saved me a serious amount of time!

    Like

  • jerry.hemesath@gmail.com

    The issue I have is pulling data from a datasource list that has a lookup field to another list. Int he field, a on click script is displayed (shown below) Billable Project The href text is all I want, in this case Billable Project Any thoughts?

    Like

  • Jerry, Try changing the format of the item to label. If that doesn’t work, play around with some of the other formatting options.

    Like

  • Hi Laura, Is it possible to add kind of validation script into Insert Template? The problem is that when creating a folder using inline editing mode user could enter invalid chars and this causes a JavaScript exception

    Like

  • vicky.malhar@hotmail.com

    Thanks a lot. This helped me save some time. I also liked the Video to create a new aspx page with Quicklaunch links. keep up the good work. Regards, Vicky

    Like

  • rahul.reid@gmail.com

    Hello Laura, I am trying to create a Data View Web Part on the top site and use multiple sources from the sub sites. I did this with ease on MOSS 2007 but unable to figure out on 2010. Please help me. Regards, Rahul

    Like

  • Hi Laura, I have seen your post “3 Minute Screencast: Data View Web Part, The Basics – Multiple Edit Forms” in this you have shown how to create edit | delete link in data view web part.Is that possible in SharePoint 2010 i was trying doing that, however i didn’t find the “Data view properties” where we can check those edit item, delete item links under editing tab. Please help me. Regards, Raman

    Like

  • Hi Laura, I have seen your post “3 Minute Screencast: Data View Web Part, The Basics – Multiple Edit Forms” in this you have shown how to create edit | delete link in data view web part.Is that possible in SharePoint 2010 i was trying doing that, however i didn’t find the “Data view properties” where we can check those edit item, delete item links under editing tab. Please help me. Regards, Raman

    Like

  • Raman, In 2010, it’s called inline editing. This can be done in just regular view settings, as well as with sharepoint designer.

    Like

  • rahul.reid@gmail.com

    Hello Laura, I am trying to create a Data View Web Part on the top site and use multiple sources from the sub sites. I did this with ease on MOSS 2007 but unable to figure out on 2010. Please help me. Regards, Rahul

    Like

  • Really Cool Stuff. Thanks.

    Like

  • Is it possible to view item on the same listview webpart, ex the annoucment listview webpart will show all the added items, when the user clicks the item -> the item view preciesly the “Body” will be shown under the item also it must use the minimize functionality -like I have a heading when I click on it show me the details under it. and not opening the Display form . zooz

    Like

  • Azooz, Yes, there’s a style in the regular list view settings, called “newsletter” which does this.

    Like

  • Is it possible to remove the “select” check box to the left of the items and the “select all” check box in the header? Thanks

    Like

  • Trinh, Yes. In the view settings in the browser, uncheck the box for “tabular view”.

    Like

  • Laura, when i uncheck the tabular view option in the browser, the check boxes still show up in my listview web part on a custom page. Do you know how i can disable these boxes in that situation. Thanks

    Like

  • Dean, This is a per-view setting, so you’d have to uncheck the box in the settings of every single view of that list. So go to the custom page and go to the web part toolpane, edit the current view, and then uncheck tabular in there.

    Like

  • Hello Laura, I am trying to create a Data View Web Part on the top site and use multiple sources from the sub sites. I did this with ease on MOSS 2007 but unable to figure out on 2010. Please help me. Regards, Yao

    Like

  • Yao, In sharepoint designer 2010, click data sources on the left, then you can create your linked sources. unfortunately, they have removed the interface for creating linked sources across multiple sites, so you’d have to go into the code somehow to do it.

    Like

  • Dear Laura, Can you tell me how can we get Action Dropdown with View In DataSheet Option in SharePoint List. Vijay

    Like

  • HI, how to create cascade lookup column for datasheet view. i mean, i was created cascade lookup, its working fine in standard view but not working in datasheet view. content is not getting filtered in datasheet view, it showing all the options. plz anybody help me as early as possible

    Like

  • Vijay, Are you referring to the fact that they moved it to a different location in 2010? I don’t think you can change it. Suresh, Nope, I doubt that’s possible. Maybe try it in inline editing.

    Like

  • Hi Laura, thanks for your reply. inline editing also not giving the result. i will clarify the my issue once again. i have created cascade lookup field drop down to enable parent child relationship among the lists in share point 2010. For example, if u select a particular country in parent list, the child list should display only the cites of that particular countries. I am getting this result in standard view but not getting in datasheet view. in datasheet view child has showing all the options. so, hot to get filter the content in child column in datasheet view

    Like

  • Laura, I have done validation control in new form.aspx and edit form.aspx for a list which r working fine.But the same thing cannot be working in datasheet view. I have only sharepoint designer 2007(no VS code) Plz help me

    Like

  • I’m stuck on DVWP and Filter with Variable – Query String. I have records that have value of Yes or No. After I configure the variable – I leave the default value blank. If I then access the URL I see NO records returned unless I use the ?variable=Yes. What value can I set for the Default Value so that ALL records are returned if no variable is sent along with URL? Help!

    Like

  • Sayonara, None of this is applicable to the datasheet view. Sorry. Eric, You’d have to create a filter in the web part where it will show items where variable is blank OR equal to the parameter value.

    Like

  • Hi Laura, It is nice , may i know if i want to print this dataview then how to achived print privew for the same. Regards Manish SharePoint Developer

    Like

  • Hi I created the custom data view page but I cannot attach files! what can I do? Thanks

    Like

  • Manish, No, there’s no such functionality. If someone wants to print their SharePoint site, they’re just printing using the browser’s regular print settings. Fati, If you want people to be able to add attachments, don’t use the inline editing.

    Like

  • Laura, Excellent article and instructions. I have generated the custom list view and t looks great, however, when I try to add a the list as a web part and select the view I customized, the conditional formatting is not appearing. Is there something I am missing to make sure this conditional formatting will appear on the customized web part page?

    Like

  • Karrie, You didn’t do anything wrong, it’s a really annoying bug. To get it done on a web part, you’d have to directly edit that web part page in SharePoint Designer. Using an old school data vierw web part instead of a list view web part will get around that bug.

    Like

  • Laura, it’s been a while, but this last post and answer is the only place I can find the same issue I have on the net.(the one from Karrie).
    What do you mean with your answer? Are you giving two options?
    If I open the whole page with the webpart in Sharepoint Designer I don’t get any options for conditional format.
    ‘Old school data vierw’ web part is not in my list of web parts. Can you give a more precise name of the webpart(I have to translate it in Dutch) and how to get the conditional formated view of the list in this webpart?
    Thank you very much.

    Like

  • Florisz,
    Sure, here’s my video explaining what I mean by “old school” data view versus the XSLT list view web part:

    Like

  • Hi Laura,
    I am a big fun of yours! You are doing a great job with the SharePoint community!
    I need your help!
    My company uploaded documents to a document library. These documents were tagged using the Metadata defined on the Taxonomy Store. I created a content type and used it on the library as a document type. The terms are: State, Line of Biz among others. The issue is that a document can belong to two or more states, and used by several Lines of biz. So, I went to the library and edited the content type to allow multiple values for those fields. However, the views did not work anymore, since I cannot grouped by these multi-value fields (I had to remove the index from them…) How should I approach this?
    Thanks so much for your advice!
    Mima

    Like

  • Hi Mima,
    You may want to try using Metadata navigation for that library.
    If you don’t see “metadata navigation” in your library settings, the feature may not be enabled. It is a site feature that you can enable. It’s a great way for getting around and slicing and dicing data like yours.

    Like

Leave a reply or question

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s