BDC number instead of string
-
22 Februari 2007 18:26
I've a SQLServer table with an int column. I want to access this table with a BDC an show its content in a Business Data List web part. But in the web part the integer column of the database table is now just a text column.
The type descriptor in the BDC for the column is
<TypeDescriptor TypeName="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Name="MyAge" />
The XSL of the web part is
<th class="ms-vh" align="right">
<xsl:call-template name="dvt.headerfield" ddwrt:atomic="1">
<xsl:with-param name="fieldname">@MyAge</xsl:with-param>
<xsl:with-param name="fieldtitle">
<xsl:value-of select="$ColName_2" />
</xsl:with-param>
<xsl:with-param name="displayname">
<xsl:value-of select="$ColName_2" />
</xsl:with-param>
<xsl:with-param name="fieldtype">number</xsl:with-param>
</xsl:call-template>
</th>Either the red nor the yellow values seem to have any influence of the display.
I tried to manipulate it with Sharepoint Designer. But it can just manipulate the display format and not the data type. After this manipulation the link "Site Actions" | "Edit Page" in Sharepoint is not visible anymore. Why has it disappeared?
How can I achieve that the column is really a number and not a string (and that it's aligned to the right)?