我正在使用下一个SQLDataSource选择cmnd:
SelectCommand="SELECT [itemTitle]
FROM orders
INNER JOIN items
on orders.itemId = items.itemId
WHERE costumerId = @costumerId ">
gridview代码:
<asp:GridView ID="GridView1" runat="server" CellPadding="4"
DataSourceID="UserProfileOrder" ForeColor="#333333" GridLines="None">
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
<Columns>
</Columns>
如您所见,它是空的,但它从SQLDataSource获取详细信息...所以outpot是:
有办法更改标题标题吗?现在,它显示SELECT命令中列的名称。
答案 0 :(得分:0)
写如
select [itemTitle] as Header1
FROM orders