网格视图在页面加载时间不可见

时间:2019-06-16 11:23:38

标签: c# asp.net

  <div id="data">
        <asp:ScriptManager ID="scriptmanager1" runat="server">
        </asp:ScriptManager>
       <asp:Panel ID="pnl" runat="server" Height="98%" Width="98%" CssClass="style5" Visible="true">
            <div align="center">
                <div>
                    <asp:Label ID="lbl1" runat="server" Text="Time Table Primary" Font-Bold="True" 
                        Font-Size="30px"></asp:Label>
                </div>
<asp:GridView ID="gdtimetblprimary" runat="server" alignment="right" AutoGenerateColumns="False"
                    BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" ViewStateMode="Enabled"
                    CellPadding="3" OnSelectedIndexChanged="grdstock_SelectedIndexChanged" Visible="true">
                    <Columns>
                        <asp:TemplateField HeaderText="Time Period">
                            <ItemTemplate>
                                <table id="table" border="1px">
                                    <tr style="border: solid 1px" id="row1" runat="server">
                                        <td>
                                            <b>09:05 AM-09:40 AM</b>
                                        </td>
                                    </tr>
                                    <tr style="border: solid 1px" id="Tr1" runat="server">
                                        <td>
                                            <b>09:40 AM-10:15 AM</b>
                                        </td>
                                    </tr>
                                    <tr style="border: solid 1px" id="Tr2" runat="server">
                                        <td>
                                            <b>10:15 AM-10:50 AM</b>
                                        </td>
                                    </tr>
                                    <tr style="border: solid 1px" id="Tr3" runat="server">
                                        <td>
                                            <b>Short Break</b>
                                        </td>
                                    </tr>
                                    <tr style="border: solid 1px" id="Tr4" runat="server">
                                        <td>
                                            <b>11:00 AM-11:35 AM</b>
                                        </td>
                                    </tr>
                                    <tr style="border: solid 1px" id="Tr5" runat="server">
                                        <td>
                                            <b>11:35 AM-12:10 PM</b>
                                        </td>
                                    </tr>
                                    <tr style="border: solid 1px" id="Tr6" runat="server">
                                        <td>
                                            <b>Long Break</b>
                                        </td>
                                    </tr>
                                    <tr style="border: solid 1px" id="Tr7" runat="server">
                                        <td>
                                            <b>12:40 PM-01:15 PM</b>
                                        </td>
                                    </tr>
                                    <tr style="border: solid 1px" id="Tr8" runat="server">
                                        <td>
                                            <b>01:15 PM-01:50 PM</b>
                                        </td>
                                    </tr>
                                    <tr style="border: solid 1px" id="Tr9" runat="server">
                                        <td>
                                            <b>01:15 PM-02:25 PM</b>
                                        </td>
                                    </tr>
                                    <tr style="border: solid 1px" id="Tr10" runat="server">
                                        <td>
                                            <b>02:25 PM-03:00 PM</b>
                                        </td>
                                    </tr>
                                </table>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Board">
                            <ItemTemplate>
                                <table id="table1" border="1px">
                                    <tr>
                                        <td>
                                            <b>S.S.C.</b>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <b>S.S.C.</b>
                                        </td>
                                    </tr>
                                     <tr>
                                        <td>
                                            <b>S.S.C.</b>
                                        </td>
                                    </tr>
                                    <tr style="height: 20px" id="Tr11" runat="server">
                                        <td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <b>S.S.C.</b>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <b>S.S.C.</b>
                                        </td>
                                    </tr>
                                    <tr style="height: 20px" id="Tr12" runat="server">
                                        <td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <b>S.S.C.</b>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <b>S.S.C.</b>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <b>S.S.C.</b>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <b>S.S.C.</b>
                                        </td>
                                    </tr>
                                </table>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="STD">
                            <ItemTemplate>
                                <table id="" border="1px">
                                    <tr>
                                        <td>
                                            1
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            1
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            2
                                        </td>
                                    </tr>
                                    <tr style="height: 20px" id="Tr13" runat="server">
                                        <td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            2
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            3
                                        </td>
                                    </tr>
                                    <tr style="height: 20px" id="Tr14" runat="server">
                                        <td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            3
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            4
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            4
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            1
                                        </td>
                                    </tr>
                                </table>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="DIV">
                            <ItemTemplate>
                                <table id="" border="1px">
                                    <tr>
                                        <td>
                                            A
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            B
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            A
                                        </td>
                                    </tr>
                                    <tr style="height: 20px" id="Tr13" runat="server">
                                        <td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            B
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            A
                                        </td>
                                    </tr>
                                    <tr style="height: 20px" id="Tr14" runat="server">
                                        <td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            B
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            A
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            B
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            A
                                        </td>
                                    </tr>
                                 </table>
                            </ItemTemplate>
                        </asp:TemplateField>
 </asp:GridView>


          </div>

        </asp:Panel>

       </div>

1 个答案:

答案 0 :(得分:0)

您是否从服务器端填充了gridview数据并使用了databind方法?