This is a migrated thread and some comments may be shown as answers.

grid not shwoing at run time

1 Answer 45 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bill
Top achievements
Rank 2
Bill asked on 05 Nov 2010, 10:20 PM
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:

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 08 Nov 2010, 05:51 AM
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.
Tags
Grid
Asked by
Bill
Top achievements
Rank 2
Answers by
Princy
Top achievements
Rank 2
Share this question
or