<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1936862515309402104</id><updated>2011-11-27T15:36:05.677-08:00</updated><title type='text'>Asp.Net Examples</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://pinkprogrammer.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1936862515309402104/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://pinkprogrammer.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Pink Programmer</name><uri>http://www.blogger.com/profile/12568404384802982654</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1936862515309402104.post-352310790204658321</id><published>2008-05-13T15:27:00.001-07:00</published><updated>2008-05-15T15:45:14.327-07:00</updated><title type='text'>Scrollable Repeater with fixed Header in both IE and Firefox</title><content type='html'>I had to do a scrollable repeater for work these days and it took me quite some time until I realised what to do in order for the reapeter to be the way I want it.&lt;br /&gt;&lt;br /&gt;I found many examples, some of them worked in IE, others in FF.&lt;br /&gt;&lt;br /&gt;This example I managed to make, works only for IE if you forget to replace what you already have in your page with this: &lt;br /&gt;&amp;lt;!DOCTYPE HTML ePUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&amp;gt;&lt;br /&gt;&lt;br /&gt;So, you put in th page an empty div and under it you  draw the repeater inside a div tag that has overflow :&lt;br /&gt;&lt;br /&gt;&amp;lt;div id="tableHeader"&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;div style="overflow: scroll; height:500px; width:500px"&amp;gt;&lt;br /&gt;&amp;lt;div&amp;gt;&lt;br /&gt;&amp;lt;asp:Repeater ID="myReapeter" runat="server"&amp;gt;&lt;br /&gt;&amp;lt;HeaderTemplate&amp;gt;&lt;br /&gt;&amp;lt;table id="table" width="500" style="table-layout:fixed;"&amp;gt;&lt;br /&gt;&amp;lt;thead&amp;gt;&lt;br /&gt;&amp;lt;tr id="thead" style=" width: 500px; top: 12px;table-layout:fixed;"&amp;gt;&lt;br /&gt;&amp;lt;th class="txt" style="padding-left: 10px;background-color: #dedede;"&amp;gt;&lt;br /&gt;Name&amp;lt;/th&amp;gt;&lt;br /&gt;&amp;lt;th  class="txt" style="padding-left: 10px;background-color: #dedede;"&amp;gt;&lt;br /&gt;Group&amp;lt;/th&amp;gt;&lt;br /&gt;&amp;lt;th  class="txt" style="padding-left: 10px;background-color: #dedede;"&amp;gt;&lt;br /&gt;Description&amp;lt;/th&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;lt;/thead&amp;gt;&lt;br /&gt;&amp;lt;/HeaderTemplate&amp;gt;&lt;br /&gt;&amp;lt;ItemTemplate&amp;gt;&lt;br /&gt;...&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;Don' forget to add style to the table, particullary table-layout:fixed;&lt;br /&gt;You must have these tags also because we are going to use them :&amp;lt;thead&amp;gt;&amp;lt;/thead&amp;gt;&lt;br /&gt;&lt;br /&gt;Inside the  &amp;lt;ItemTemplate&amp;gt; Tags you draw the content you get from the  database.&lt;br /&gt;&lt;br /&gt;The Table Header will stay outside the div with overflow:scroll if you use this little javascript code:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;function fixHeader()&lt;br /&gt;{&lt;br /&gt;var t = document.getElementById("table");&lt;br /&gt;var thead = t.getElementsByTagName("thead")[0];&lt;br /&gt;var t1 = t.cloneNode(false);&lt;br /&gt;t1.appendChild(thead);&lt;br /&gt;tableHeader.appendChild(t1)&lt;br /&gt;}&lt;br /&gt;window.onload = fixHeader&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1936862515309402104-352310790204658321?l=pinkprogrammer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinkprogrammer.blogspot.com/feeds/352310790204658321/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1936862515309402104&amp;postID=352310790204658321' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1936862515309402104/posts/default/352310790204658321'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1936862515309402104/posts/default/352310790204658321'/><link rel='alternate' type='text/html' href='http://pinkprogrammer.blogspot.com/2008/05/i-had-to-do-scrollable-repeater-for_13.html' title='Scrollable Repeater with fixed Header in both IE and Firefox'/><author><name>Pink Programmer</name><uri>http://www.blogger.com/profile/12568404384802982654</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>
