Multiple Data sources in TemplateColumn

  • Thread starter Thread starter tshad
  • Start date Start date
T

tshad

The following gives me an error:

Character is not valid

The TemplateColumn

<asp:TemplateColumn Visible="true" HeaderText="Meets Job Rqrmnts"
ItemStyle-Width="170px" ItemStyle-VerticalAlign="middle">
<itemtemplate>
<asp:Label ID="ScreenSkills" Text='<%#
Container.DataItem("ScreenTestScoreDesc")%> <%#
Container.DataItem("SkillsTestScoreDesc")%>' runat="server"/>
</itemtemplate>
</asp:TemplateColumn>

I actually want to do it like so (with a slash and not a blank):

<asp:TemplateColumn Visible="true" HeaderText="Meets Job Rqrmnts"
ItemStyle-Width="170px" ItemStyle-VerticalAlign="middle">
<itemtemplate>
<asp:Label ID="ScreenSkills" Text='<%#
Container.DataItem("ScreenTestScoreDesc")%>/<%#
Container.DataItem("SkillsTestScoreDesc")%>' runat="server"/>
</itemtemplate>
</asp:TemplateColumn>

How would I do this?

Thanks

Tom
 
AFAIK, you can concat them without creating a seperate <%#....%>

<asp:Label ID="ScreenSkills" Text='<%#
Container.DataItem("ScreenTestScoreDesc") + "/" +
Container.DataItem("SkillsTestScoreDesc")%>' runat="server"/>

I havent tested this. But, it should work

Kalpesh
 
Back
Top