asp.NET CSS Issue on Post Back -


we developing asp.net 4.0 web forms application. in particular screen attempted create grid view fixed header , footer. got working how wanted, realised when click button issues partial post (triggers required field validators example) fixed header disappears.

any ideas why happening?

code follows:

css (relevant parts):

.tablestyle { }  .tablestyle th {     text-align: left !important;     padding: 2px 5px !important;     font-weight: bold; }  .tablestyle td {     padding: 1px 5px !important;     text-align: left; }  .container {     overflow-y: scroll;     overflow-x: hidden;     height: 500px;  }  .container table tbody {     overflow-x: hidden; }  /* creates scrollable div */ .gridviewcontainer {     overflow: auto; }  .freezeheader {     position: absolute;     background-color: white;     font-weight: bold;     margin-top: -40px;     padding-bottom: 5px;     z-index: 99; }  .freezefooter {     position: absolute;     background-color: white;     top: 530px;     padding-bottom: 20px;     z-index: 95; }  .paddingtop {     margin-top: 40px; } 

aspx page (grid view part):

<fieldset> <legend>products mapping table (ext_cfg_pdt_map)</legend> <div id="grdwithscroll" class="container">     <asp:gridview          id="productsmappingtablegridview"           autogeneratecolumns="false"          runat="server"         onrowcancelingedit="productsmappingtablegridview_rowcancelingedit"          onrowediting="productsmappingtablegridview_rowediting"         onrowupdating="productsmappingtablegridview_rowupdating"          showfooter="true"          onrowcommand="productsmappingtablegridview_rowcommand"          cssclass="tablestyle paddingtop"         headerstyle-cssclass="freezeheader"         footerstyle-cssclass="freezefooter">         <columns>             <asp:templatefield>                 <itemtemplate>                     <asp:button id="editbutton" text="edit" causesvalidation="false" commandname="edit" runat="server" enabled='<%# session["productsmappingswriteaccess"]  %>'/>                 </itemtemplate>                 <edititemtemplate>                     <asp:button id="updatebutton" text="update" commandname="update" runat="server" validationgroup="edit"/>                     <asp:button id="cancelbutton" text="cancel" causesvalidation="false" commandname="cancel" runat="server" />                 </edititemtemplate>                 <footertemplate>                     <asp:button id="insertbutton" text="insert" commandname="insert" runat="server" validationgroup="insert" enabled='<%# session["productsmappingswriteaccess"]  %>'/>                 </footertemplate>             </asp:templatefield>             <asp:templatefield>                 <headertemplate>product mapping id</headertemplate>                 <itemtemplate>                     <asp:label id="mptidlabel" runat="server" text='<%# eval("mpt_id") %>'></asp:label>                 </itemtemplate>             </asp:templatefield>             <asp:templatefield>                 <headertemplate>source key</headertemplate>                 <itemtemplate>                     <asp:label id="srckeylabel" runat="server" text='<%# eval("src_key") %>'></asp:label>                 </itemtemplate>                 <edititemtemplate>                 <asp:dropdownlist autopostback="false" id="srckeylistedit" runat="server" width="95px" onload="srckeylistinitalization" >                         </asp:dropdownlist>                 </edititemtemplate>                 <footertemplate>                 <asp:dropdownlist autopostback="false" id="srckeylistinsert" runat="server" width="95px" onload="srckeylistinitalization"                      visible='<%# session["productsmappingswriteaccess"]  %>'>                         </asp:dropdownlist>                 </footertemplate>             </asp:templatefield>             <asp:templatefield>                 <headertemplate>product key - source</headertemplate>                 <itemtemplate>                     <asp:label id="pdtkeysrclabel" runat="server" text='<%# eval("pdt_key_src") %>'></asp:label>                 </itemtemplate>                 <edititemtemplate>                     <asp:textbox id="pdtkeysrctextboxedit" runat="server" text='<%# eval("pdt_src") %>'                         maxlength="32"></asp:textbox>                         <br />                     <asp:requiredfieldvalidator runat="server" id="pdtkeysrctextboxeditrequiredfieldvalidator"                         controltovalidate="pdtkeysrctextboxedit" validationgroup="edit" forecolor="red"                         errormessage="pdt_key_src required"></asp:requiredfieldvalidator>                 </edititemtemplate>                 <footertemplate>                     <asp:textbox id="pdtkeysrctextboxinsert" runat="server" text='<%# eval("key_src") %>'                         maxlength="32" visible='<%# session["productsmappingswriteaccess"]  %>'></asp:textbox>                         <br />                     <asp:requiredfieldvalidator runat="server" id="pdtkeysrctextboxinsertrequiredfieldvalidator"                         controltovalidate="pdtkeysrctextboxinsert" validationgroup="insert" forecolor="red"                         errormessage="pdt_key_src required"></asp:requiredfieldvalidator>                 </footertemplate>             </asp:templatefield>         </columns>     </asp:gridview> </div> </fieldset> 

update 1: point out appears not have been affected on ie 8 affected when used ie 10.

a hotfix available asp.net browser definition files in microsoft .net

please refer http://support.microsoft.com/kb/2600088 .net 4.0

refer http://support.microsoft.com/kb/2608565 .net 3.5


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -