Introduction
As design View from SharePoint Designer 2013 has been removed, there is no way left to do out of box conditional formatting. But one who has little knowledge of XSLT can do it without Design view.
Steps:
To start with Conditional Formatting , follow below step :
1. Open your SharePoint 2013 in SPD and navigate to your custom page and edit it in Advance view.
2. Insert a Data View web part in your page. Click on Insert -> DataView->Select your list.
3. Change this web part XSLTList view web part by clicking on List View Tools ->Design -> Customize XSLT ->Customize Entire View. After this all XSLT for this web part will appear on page.
4. For ROW formatting search for
<xsl:variable name="EditMode" select="$dvt_form_key = @ID or $dvt_form_key = @BdcIdentity"/>
<tr>
After <tr> paste below code :
<xsl:attribute name="style">
<xsl:if test="$thisNode/@Testfield = 'Start'">background-color: #FFFF00;</xsl:if>
<xsl:if test="$thisNode/@Testfield = 'Stop'">background-color: #FF0000;</xsl:if>
<xsl:if test="$thisNode/@Testfield = 'Waiting'">background-color: #00FF00;</xsl:if>
</xsl:attribute>
Note: Testfield is fields internal name . All fields name can be found under <ViewFields> tag. Also you can add or remove fields from List View Tools->Options -> Add/Remove Columns.
5. for Column Formatting, search for
<xsl:template name="FieldRef_printTableCell_EcbAllowed.Testfield" match="FieldRef[@Name='Test']" mode="printTableCellEcbAllowed" ddwrt:dvt_mode="body" ddwrt:ghost="hide">
<xsl:param name="thisNode" select="."/>
<xsl:param name="Position" select="1"/> <xsl:param name="class" />
<td>
Testfield again field's internal name. Copy below code after <td> :
<xsl:attribute name="style">
<xsl:if test="$thisNode/@Testfield = 'Start'">background-color: #FFFF00;</xsl:if>
<xsl:if test="$thisNode/@Testfield = 'Stop'">background-color: #FF0000;</xsl:if>
<xsl:if test="$thisNode/@Testfield = 'Waiting'">background-color: #00FF00;</xsl:if>
</xsl:attribute>
That's it. Save this page and preview in browser.
