gridview为空数据的时候的显示

Posted on 2006-12-18 20:11  灰色_軌迹  阅读(1284)  评论(0编辑  收藏  举报
在源里面加上表格和标头名称
<asp:GridView ID="gvAppointOfPending" runat="server" AutoGenerateColumns="False" DataSourceID="objDsAppointAndChangeOfPending" DataKeyNames="AEID">
                             <Columns>
<asp:TemplateField>
                        <ItemTemplate>
                            <asp:LinkButton ID="lnBtnSeekAppointDetail" runat="server">详情</asp:LinkButton>
                            <asp:LinkButton ID="lnkBtnModifyAppoint" runat="server" CommandArgument ='<%#Eval("AEID") %>' OnClick="lnkBtnModifyAppoint_Click">修改</asp:LinkButton>
                            <asp:LinkButton ID="lnkBtnCancelAppoint" runat="server">取消</asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                 <EmptyDataTemplate>
                <Table>
                <tr>
                <td>课程名称</td>
                <td>实验项目</td>
                <td>批次</td>
                <td>周次</td>
                <td>星期</td>
                <td>节次</td>
                <td>实验室</td>
                <td>人数</td>
                <td>人时数</td>
                <td>申请原因</td>
                </tr>
                </Table>
            </EmptyDataTemplate>
                        </asp:GridView>

Copyright © 2024 灰色_軌迹
Powered by .NET 9.0 on Kubernetes