Bineesh  Viswanath

Bineesh Viswanath

  • NA
  • 1k
  • 777.5k

GridView does not appear in ASP.NET Page Load

Aug 25 2013 2:56 AM
Sir, I am doing a Mark Entering Function in GridView in ASP.NET.

The problem in this is GridView is not showing in runtime. But showing in design time.

My task is to Enter Name, te mark, ce mark, pe mark.

each time when i enter a mark, it has to be manipulated in the total column.

Please send me the code to this function.

I did the html code to Crete the controls inside the GridView.

Here how my gridView Looks like:-



The html code to this GridView is :-

<asp:GridView ID="dgvMarkEntry" runat="server" BackColor="White"  style="margin-left:120px; margin-top:80px; margin-right: 1px;"
  BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" CellPadding="3"
  ForeColor="Black" GridLines="Vertical" AutoGenerateColumns="False"
  onselectedindexchanged="dgvMarkEntry_SelectedIndexChanged">
  <FooterStyle BackColor="#CCCCCC"  />
  <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
  <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
  <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
  <AlternatingRowStyle BackColor="#CCCCCC"  />
  <Columns>
  <asp:BoundField DataField="firstName"  HeaderText="Name" />
  <asp:TemplateField HeaderText="TE">
  <EditItemTemplate>
  <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("te") %>'></asp:TextBox>
  </EditItemTemplate>
  <ItemTemplate>
  <asp:TextBox ID="txtGTe" runat="server"></asp:TextBox>
  </ItemTemplate>
  </asp:TemplateField>
  <asp:TemplateField HeaderText="CE">
  <EditItemTemplate>
  <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("ce") %>'></asp:TextBox>
  </EditItemTemplate>
  <ItemTemplate>
  <asp:TextBox ID="txtGCe" runat="server"></asp:TextBox>
  </ItemTemplate>
  </asp:TemplateField>
  <asp:TemplateField HeaderText="PE">
  <EditItemTemplate>
  <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("pe") %>'></asp:TextBox>
  </EditItemTemplate>
  <ItemTemplate>
  <asp:TextBox ID="txtGPe" runat="server"></asp:TextBox>
  </ItemTemplate>
  </asp:TemplateField>
  <asp:TemplateField HeaderText="Total">
  <EditItemTemplate>
  <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
  </EditItemTemplate>
  <ItemTemplate>
  <asp:TextBox ID="txtGTotal" runat="server" ReadOnly="True"></asp:TextBox>
  </ItemTemplate>
  </asp:TemplateField>
  </Columns>



Answers (3)