|
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="FrozenGridHeader_Solution2_BrowserCompatability.aspx.cs" Inherits="FrozenGridHeader_SafariFlock" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Header-Frozen GridView - Safari/Flock Compatability</title>
<link href="CSS/GridStyle.css" rel="stylesheet" type="text/css" />
<script src="JS/jquery-1.3.js" type="text/javascript"></script>
</head>
<body>
<form id="form1" runat="server">
<h2 runat="server" id="pageHeader">Freezing Grid Header Row - compatability for every browsers</h2>
<div style="width:100%;">
<asp:GridView ID="gvCustomers" runat="server" AllowSorting="False" AutoGenerateColumns="False"
PersistedSelection="true"
CssClass="gridview_style" EnableViewState="True" EnableTheming="false">
<AlternatingRowStyle CssClass="altrow" />
<HeaderStyle Height="50px" />
<Columns>
<asp:TemplateField ItemStyle-Width="120px" ItemStyle-HorizontalAlign="Center" HeaderText="Customer ID">
<ItemTemplate>
<asp:Label ID="lblCustomerID" runat="server" Text='<%# (string) Eval("CustomerID")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="110px" ItemStyle-HorizontalAlign="Left" HeaderText="Customer Name">
<ItemTemplate>
<asp:Label ID="lblContactName" runat="server" Text='<%# (string) Eval("ContactName")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="130px" ItemStyle-HorizontalAlign="Left" HeaderText="Title">
<ItemTemplate>
<asp:Label ID="lblContactTitle" runat="server" Text='<%# (string) Eval("ContactTitle")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="200px" ItemStyle-HorizontalAlign="Left" HeaderText="Address">
<ItemTemplate>
<asp:Label ID="lblAddress" runat="server" Text='<%# (string) Eval("Address")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="200px" ItemStyle-HorizontalAlign="Left" HeaderText="Company Name">
<ItemTemplate>
<asp:Label ID="lblCompanyName" runat="server" Text='<%# (string) Eval("CompanyName")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Left" HeaderText="Phone">
<ItemTemplate>
<asp:Label ID="lblPhone" runat="server" Text='<%# (string) Eval("Phone")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Left" HeaderText="Fax">
<ItemTemplate>
<asp:Label ID="lblFax" runat="server" Text='<%# (Eval("Fax") == null)?"":Eval("Fax")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderStyle-HorizontalAlign="Center">
<ControlStyle Width="25px" />
<ItemTemplate>
<center>
<a href='#'>Edit</a>
</center>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
<br />
</form>
</body>
</html>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I love working with Web-based workflow automation systems, ERP systems for SME, Data Visualization and Augmented Intelligence.
I have been working in ASP.NET for more than 12 years. I've also been working on Java and Windows-based apps for more than 5 years. My core competencies include ASP.NET (+net core), MVC, Restful API, Advance JavaScript, JQuery, Bootstrap, SubSonic, Dapper, Entity Framework, Lucne.net, ElasticSearch Ajax... I'm particularly interested in building smart apps with great UI/UX and high earned value.
I love to write elegant code. I am a type of pragmatic personality.
Recently, I've been interested in developing SPA apps using Angular with NodeJS backend. I also love to write the progressive web apps which could be the next big thing for the mobile web.
Feel free to discuss with me at: phamdinhtruong@gmail.com