Watch this example on YouTube
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource2">
<Columns>
<asp:TemplateField HeaderText="Customer" SortExpression="CustomerID">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# String.Format("{0} {1} {2} {3} {4}" ,"(", Eval("CustomerID") , "-" ,Eval("CustomerName"), ")") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
No comments:
Post a Comment