日期:2014-05-17  浏览次数:20477 次

怎么创建DataTable后再将其代码绑定到gridview中去
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table >
            <tr>
                <th>
                    类型周期:
                </th>
                <td>
                    <asp:CheckBoxList ID="ck" runat="server" AutoPostBack="true" 
                        RepeatDirection="Horizontal" onselectedindexchanged="ck_SelectedIndexChanged" >
                        <asp:ListItem Value="0" >季</asp:ListItem>
                        <asp:ListItem Value="1">年</asp:ListItem>
                        <asp:ListItem Value="2">月</asp:ListItem>
                        <asp:ListItem Value="3">日</asp:ListItem>
                    </asp:CheckBoxList>
                </td>
            </tr>
        </table>
        <table>
            <tr>
                <td>
                    <asp:GridView ID="gvw" runat="server" header AutoGenerateColumns="False">
                        <Columns>
                            <asp:TemplateField HeaderText="序号">
                                <ItemTemplate >