What is the difference between Data View Web Part (DVWP) and Content Query Web Part (CQWP)?

Cited: http://www.sharepointblog.co.uk/

Features of DVWP

  • SharePoint Designer is required for developing DVWP.
  • DVWP can fetch data from data sources other than lists like xml files.
  • DVWP can fetch data from other site collection.
  • DVWP can merge data from more than one list.

Features of CQWP

  • CQWP can fetch data based on Content Type.
  • You can enable RSS feed in CQWP.
    • RSS feed in CQWP is XSLT based, which gives you option to customize the RSS feed. CQWP uses the /Style Library/Xsl Style Sheets/Rss.xsl file for rendering RSS feeds.
    • Edit the web part and add the “RSS Feed List” as a source.
    • In the Presentation Section under Feed enable feed for the web part. In the Fields to display map the Description list column with the Description slot.
  • You can map list columns with the Page properties.
  • CQWP generates Field to Display which you can map with your custom columns.
    • Slots are reusable templates in which you can map your Column Values without going into the code. CQWP parses the selected Item Style template and generates slots for it: every @Property becomes a slot.
    • We can map custom column values into these slots. E.g. If we a custom column ‘Category’ then we can map its value to ‘Title’ slot as below. Amazing thing is, we do not have to pull our hairs to get the internal name of the column. We just need to write the Display Name of the column to be mapped. So Title will take Category value now.
    • Moreover, you can map more than one column into the slot but only the first non-blank column value will be shown.

How to create Custom ‘Slots (Field to display)’?

Add your column as below to exported CQWP *.webpart file

<property name=”CommonViewFieldstype=”string” >Category, Text</property>

Advertisements

2 thoughts on “What is the difference between Data View Web Part (DVWP) and Content Query Web Part (CQWP)?

Leave a Reply

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