DVWP Wrap Column Headings
-
I want to wrap column headings for the Data View Web Part. For example I want the "On Hand To Be Allocated" to display as:
"On Hand
To Be Allocated"I have been trying to do this for a while. I would really appreciate your help.
These are parts of my dvwp code that I think may be relavant. I would appreciate if you or anyone else can help. (Though I have tried a few things, I have pasted the original code):
<style type="text/css"> .style2 { font-weight: normal; color: #003759; text-align: left; text-decoration: none; vertical-align: top; font-size: 8pt; line-height: 1.2; font-family: Verdana, Helvetica, sans-serif; white-space: nowrap; height: 21px; padding-top: 1px; padding-bottom: 0px; background-repeat: repeat-x; }
and
</th> <th class="style2" nowrap="nowrap"> <xsl:call-template name="dvt.headerfield" ddwrt:atomic="1" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"> <xsl:with-param name="fieldname">@ows\_On\_x0020\_Hand\_x0020\_To\_x0020\_Be\_</xsl:with-param> <xsl:with-param name="fieldtitle">On Hand To Be Allocated</xsl:with-param> <xsl:with-param name="displayname">On Hand To Be Allocated</xsl:with-param> <xsl:with-param name="sortable">1</xsl:with-param> <xsl:with-param name="fieldtype">Text</xsl:with-param> </xsl:call-template> </th>
and
<td class="style3" style="height: 50px; "> <xsl:value-of select="format-number(@ows\_On\_x0020\_Hand\_x0020\_To\_x0020\_Be\_, "#,##0.;-#,##0.")"/> </td>
Thanks.
-
I want to wrap column headings for the Data View Web Part. For example I want the "On Hand To Be Allocated" to display as:
"On Hand
To Be Allocated"I have been trying to do this for a while. I would really appreciate your help.
These are parts of my dvwp code that I think may be relavant. I would appreciate if you or anyone else can help. (Though I have tried a few things, I have pasted the original code):
<style type="text/css"> .style2 { font-weight: normal; color: #003759; text-align: left; text-decoration: none; vertical-align: top; font-size: 8pt; line-height: 1.2; font-family: Verdana, Helvetica, sans-serif; white-space: nowrap; height: 21px; padding-top: 1px; padding-bottom: 0px; background-repeat: repeat-x; }
and
</th> <th class="style2" nowrap="nowrap"> <xsl:call-template name="dvt.headerfield" ddwrt:atomic="1" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"> <xsl:with-param name="fieldname">@ows\_On\_x0020\_Hand\_x0020\_To\_x0020\_Be\_</xsl:with-param> <xsl:with-param name="fieldtitle">On Hand To Be Allocated</xsl:with-param> <xsl:with-param name="displayname">On Hand To Be Allocated</xsl:with-param> <xsl:with-param name="sortable">1</xsl:with-param> <xsl:with-param name="fieldtype">Text</xsl:with-param> </xsl:call-template> </th>
and
<td class="style3" style="height: 50px; "> <xsl:value-of select="format-number(@ows\_On\_x0020\_Hand\_x0020\_To\_x0020\_Be\_, "#,##0.;-#,##0.")"/> </td>
Thanks.
You don't need to format the entire post, only the code lines. Have you tried to add a <br/> element? Maybe place the title in a span with specific width?
Failure is not an option; it's the default selection.
-
You don't need to format the entire post, only the code lines. Have you tried to add a <br/> element? Maybe place the title in a span with specific width?
Failure is not an option; it's the default selection.
-
I have very limited knowledge about code. Can you please explain how to use the
element? Thank you.If you "very limited knowledge about code" then you have no business attempting this. Go learn about XSLT and HTML first. Seriously, nothing I could say would make sense to you until you have a basic level of knowledge.
Failure is not an option; it's the default selection.