grid not shwoing at run time

2 posts, 0 answers
  1. Bill
    Bill avatar
    175 posts
    Member since:
    Apr 2010

    Posted 05 Nov 2010 Link to this post

    I have a grid that when the user inputs a code (elsewhere on the screen), a client-side function will kick off to add a row to the grid. However, during runtime, I don't see the grid as how it looks in design time.
    Here is my html:
    <code>
    <td class="td_AEV" colspan="2">
                                                                                                                                        <table width="100%" bordercolor="white" border="1">
                                                                                                                                            <tr valign="top">
                                                                                                                                                <td width="85%" height="80px">
                                                                                                                                                    <table width="100%" bordercolor="black" border="1">
                                                                                                                                                        <thead>
                                                                                                                                                            <tr>
                                                                                                                                                                <td>
                                                                                                                                                                    <telerik:RadGrid ID="radCodes" runat="server" AutoGenerateColumns="False">
                                                                                                                                                                        <MasterTableView>
                                                                                                                                                                            <Columns>
                                                                                                                                                                                <telerik:GridTemplateColumn AllowFiltering="False" Groupable="False" HeaderText="Code"
                                                                                                                                                                                    ShowSortIcon="False" UniqueName="tCode">
                                                                                                                                                                                    <HeaderStyle Font-Bold="True" />
                                                                                                                                                                                    <ItemTemplate>
                                                                                                                                                                                        <asp:Label ID="lblCode" runat="server"></asp:Label>
                                                                                                                                                                                    </ItemTemplate>
                                                                                                                                                                                </telerik:GridTemplateColumn>
                                                                                                                                                                                <telerik:GridTemplateColumn AllowFiltering="False" Groupable="False" HeaderText="Description"
                                                                                                                                                                                    ShowSortIcon="False" UniqueName="tDescription">
                                                                                                                                                                                    <HeaderStyle Font-Bold="True" />
                                                                                                                                                                                    <ItemTemplate>
                                                                                                                                                                                        <asp:Label ID="lblDescription" runat="server"></asp:Label>
                                                                                                                                                                                    </ItemTemplate>
                                                                                                                                                                                </telerik:GridTemplateColumn>
                                                                                                                                                                            </Columns>
                                                                                                                                                                        </MasterTableView>
                                                                                                                                                                    </telerik:RadGrid>
                                                                                                                                                                </td>
                                                                                                                                                            </tr>
                                                                                                                                                        </thead>
                                                                                                                                                    </table>
                                                                                                                                                </td>
                                                                                                                                                <td>
                                                                                                                                                    <asp:Button ID="btnUP" Text="UP" runat="server" Font-Size="8pt" /><br />
                                                                                                                                                    <asp:Button ID="btnDWN" Text="DN" runat="server" Font-Size="8pt" /><br />
                                                                                                                                                    <asp:Button ID="btnRM" Text="RM" runat="server" Font-Size="8pt" />
                                                                                                                                                </td>
                                                                                                                                            </tr>
                                                                                                                                        </table>
                                                                                                                                    </td>
    </code>

    There is no column headers and no blank cells before I try the insert. This is what it looks like at run time via my browser:
    <code>
    <tr>
                                                                                                                                    <td class="td_AEV" colspan="2">
                                                                                                                                        <table width="100%" bordercolor="white" border="1">
                                                                                                                                            <tr valign="top">
                                                                                                                                                <td width="85%" height="80px">
                                                                                                                                                    <table width="100%" bordercolor="black" border="1">
                                                                                                                                                        <thead>
                                                                                                                                                            <tr>
                                                                                                                                                                <td>
                                                                                                                                                                    <div id="radCodes" class="RadGrid RadGrid_Default">
     
      <input id="radCodes_ClientState" name="radCodes_ClientState" type="hidden" />
       </div>
      
                                                                                                                                                                </td>
                                                                                                                                                            </tr>
                                                                                                                                                        </thead>
                                                                                                                                                    </table>
                                                                                                                                                </td>
                                                                                                                                                <td>
                                                                                                                                                    <input type="submit" name="btnUP" value="UP" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;btnUP&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" id="btnUP" style="font-size:8pt;" /><br />
                                                                                                                                                    <input type="submit" name="btnDWN" value="DN" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;btnDWN&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" id="btnDWN" style="font-size:8pt;" /><br />
                                                                                                                                                    <input type="submit" name="btnRM" value="RM" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;btnRM&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" id="btnRM" style="font-size:8pt;" />
                                                                                                                                                </td>
                                                                                                                                            </tr>
    </code>

    What am I doing wrong with the grid where I can't see the headers, etc (see the attached file right in the ICD Code PANEL where it says: Code:
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 07 Nov 2010 Link to this post

    Hello William,

    I guess the problem is because of not binding the grid to database or any other data source. There are three ways to bind the grid.

    Try to bind the grid using any of the above method and check whether this resolves your problem.

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top