c# - Gridview is not displaying footer? -


here had given "showfooter"=true property still it's not displaying while debug value(sumofamount) assign label.text

my gridview code:

      <asp:gridview id="gvgrossdetails" runat="server" allowpaging="true" autogeneratecolumns="false"            cellpadding="0" cellspacing="1" cssclass="grid_bg" gridlines="none" datakeynames="code"           onrowediting="gvpayeegross_rowediting" onrowdeleting="gvgrossdetails_rowdeleting"           onrowupdating="gvgrossdetails_rowupdating" onrowcancelingedit="gvgrossdetails_rowcancelingedit"           pagerstyle-width="0px" pagesize="10" showfooter="true" width="112%" style="margin-top: 0px"> <pagerstyle cssclass="hide" /> <selectedrowstyle cssclass="tble_hdr_not_sltd" /> <headerstyle cssclass="tble_hdr_not_sltd" /> <emptydatarowstyle cssclass="row_odd" horizontalalign="center" /> <footerstyle cssclass="hide" /> <rowstyle cssclass="row_even" /> <emptydatatemplate>     <table class="confirmation" cellpadding="0" cellspacing="0">         <tr>             <td>                 <asp:label text="records not found" id="lblempty" runat="server"></asp:label>             </td>         </tr>     </table> </emptydatatemplate> <alternatingrowstyle cssclass="row_odd" />     <columns>         <asp:templatefield visible="false">             <headertemplate>             </headertemplate>             <itemtemplate>                 <asp:label id="lblpayeeid1" runat="server" text='<%#bind("code") %>'></asp:label>             </itemtemplate>             <itemstyle width="0%" />             <headerstyle />         </asp:templatefield>          <asp:templatefield visible="false">             <headertemplate>             </headertemplate>             <itemtemplate>                 <asp:label id="lblpayeecode" runat="server" text='<%#bind("code") %>'></asp:label>             </itemtemplate>             <itemstyle width="0%" />             <headerstyle />         </asp:templatefield>          <asp:templatefield itemstyle-width="20%" headerstyle-horizontalalign="left">             <headertemplate>                 account head             </headertemplate>             <itemtemplate>                 <asp:label id="lblgrosstype" runat="server" text='<%# bind("accounthead") %>' wrap="true"></asp:label>             </itemtemplate>             <itemstyle cssclass="item_style1" />             <edititemtemplate>                 <table cellpadding="0" cellspacing="0" border="0">                     <tr>                         <td align="left" valign="middle" width="50%">                              <asp:label id="txtgrosstype" runat="server" text='<%# bind("accounthead")%>'                                 cssclass="black_normal"   width="110px"></asp:label>                          </td>                     </tr>                 </table>              </edititemtemplate>             <itemstyle width="20%" />         </asp:templatefield>         <asp:templatefield itemstyle-width="13%" headerstyle-horizontalalign="left">             <headertemplate>                 payee amount             </headertemplate>             <itemtemplate>                 <asp:label id="lblpresentedamount" runat="server" text=' <%# eval("payeeamount")%>' wrap="true"></asp:label>             </itemtemplate>             <itemstyle cssclass="item_style1" />                 <edititemtemplate>                     <table cellpadding="0" cellspacing="0" border="0">                         <tr>                             <td align="left" valign="middle">                                 <asp:label id="txtpresentedamount" runat="server" text='<%# bind("payeeamount")%>'                                     cssclass="black_normal" onblur="requiredcheck(this);" maxlength="5" width="110px"></asp:label>                              </td>                         </tr>                     </table>                 </edititemtemplate>                 <footertemplate>                     <asp:label text=text='<%# gettotalsalary() %>'  id="lbltotal" runat="server"></asp:label>                  </footertemplate>                 <itemstyle width="13%" />             </asp:templatefield>             <asp:templatefield itemstyle-width="13%" headerstyle-horizontalalign="left">                 <headertemplate>                     approved amount                 </headertemplate>                 <itemtemplate>                     <asp:label id="lblapproveamount" runat="server" text='<%# eval("approvedamount")%>'                         wrap="true"></asp:label>                 </itemtemplate>                 <itemstyle cssclass="item_style1" />                 <edititemtemplate>                     <table cellpadding="0" cellspacing="0" border="0">                         <tr>                             <td align="left" valign="middle">                                 <asp:textbox id="txtapproveamount" runat="server" text='<%# bind("approvedamount")%>'                                     cssclass="black_normal" onblur="requiredcheck(this);" maxlength="5" width="110px"></asp:textbox>                                 <ajaxtoolkit:filteredtextboxextender id="fltrapprove" runat="server" filtertype="custom"                                     filtermode="invalidchars" invalidchars="'abcdefghijklmnopqrstuvwxyz@!#$%^&*%<> ,"                                     targetcontrolid="txtapproveamount">                                 </ajaxtoolkit:filteredtextboxextender>                             </td>                         </tr>                     </table>                 </edititemtemplate>                 <footertemplate>                     <asp:textbox id="approrve" runat="server"></asp:textbox>                 </footertemplate>                 <itemstyle width="13%" />             </asp:templatefield>              <asp:templatefield itemstyle-width="6%">                 <headertemplate>                     <table width="100%" cellpadding="0" cellspacing="0" border="0" style="cursor: pointer;                         cursor: hand;">                         <tr>                             <td align="right" style="display: none" valign="middle">                                 <table width="100%" cellpadding="0" cellspacing="0" border="0">                                     <tr>                                         <td align="left" width="70%">                                             <a>delete</a>                                         </td>                                         <td style="width: 6px">                                         </td>                                     </tr>                                 </table>                             </td>                             <td align="right" valign="middle">                                 <table width="100%" cellpadding="0" cellspacing="0" border="0">                                     <tr>                                         <td align="left" width="70%">                                             <a>delete</a>                                         </td>                                         <td style="width: 6px">                                         </td>                                     </tr>                                 </table>                             </td>                         </tr>                     </table>                 </headertemplate>                 <itemtemplate>                     <table cellpadding="0" cellspacing="0" border="0" style="padding-left: 3px">                         <tr>                             <td align="right" height="19px" valign="middle">                                 <asp:button id="btnsedit" cssclass="btnedit" runat="server" commandname="edit" usesubmitbehavior="false"                                     causesvalidation="false" />                              </td>                             <td align="right" height="19px" valign="middle">                                 <asp:button id="btnsdelete" cssclass="btndelete" runat="server" commandname="delete"                                     usesubmitbehavior="false" causesvalidation="false" />                              </td>                         </tr>                     </table>                 </itemtemplate>                 <edititemtemplate>                     <table cellpadding="0" cellspacing="0">                         <tr>                             <td align="right" valign="middle" nowrap>                                 <asp:button id="btnsupdate" cssclass="btnupdate" runat="server" commandname="update"                                     usesubmitbehavior="false" validationgroup="gsave" causesvalidation="false" />                                 <asp:button id="btnscancel" cssclass="btncancel" runat="server" commandname="cancel"                                     usesubmitbehavior="false" causesvalidation="false" />                              </td>                         </tr>                     </table>                 </edititemtemplate>                 <itemstyle width="6%" />             </asp:templatefield>         </columns>     </asp:gridview> 

sumof total

   if (e.row.rowtype == datacontrolrowtype.datarow || e.row.rowtype == datacontrolrowtype.separator)     {         total += convert.toint32(databinder.eval(e.row.dataitem, "grossamount"));     }     if (e.row.rowtype == datacontrolrowtype.datarow || e.row.rowtype == datacontrolrowtype.separator)     {         total += convert.toint32(databinder.eval(e.row.dataitem, "approvedamount"));     }     if (e.row.rowtype == datacontrolrowtype.footer)     {         label lblamount = (label)e.row.findcontrol("lblgrossamount");         lblamount.text = total.tostring();     } 

here had given "showfooter"=true property still it's not displaying while debug value(sumofamount) assign label.text

this line apply css gridview infooter:

<footerstyle cssclass="hide" /> 

i think can hide footr of gridview pls check css...


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -