0 Replies - 1982 Views - Last Post: 08 February 2010 - 03:26 AM Rate Topic: -----

#1 Net Cemeteries  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 52
  • Joined: 14-April 09

jQuery FixedHeaderRow script - dynamic scroll width (parameter to jQue

Posted 08 February 2010 - 03:26 AM

<asp:Panel ID="Panel2" style="width:720px; border-style: outset; border-width: 4px; " runat="server" ScrollBars="Horizontal">
<script src="Scripts/jquery-1.2.6.js" type="text/javascript"></script>
<script src="Scripts/webtoolkit.jscrollable.js" type="text/javascript"></script>
<script src="Scripts/webtoolkit.scrollabletable.js" type="text/javascript"></script>    

<script type="text/javascript">
    $(document).ready(function() {
        jQuery('#<%=GridView2.ClientID%>').Scrollable(400, 2000);
    });
</script>

    <asp:GridView ID="GridView2" runat="server" 
        DataSourceID="SqlDataSource1" OnPreRender="GridView2_PreRender"
        onrowcreated="GridView1_RowCreated" Width="100%" 
        ondatabound="GridView2_DataBound" CellPadding="4" ForeColor="#333333" 
        GridLines="both">
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <EditRowStyle BackColor="#999999" />
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
    </asp:GridView>



When column count is about 20 it looks like perfect (except: I can't see vertical scroll bar before scroll horizontal scrollbar to the right scope)

But when column count is 4 I've got same 2000 width and 500pt for each column and horizontal scroll :-S that's fail.

Is there some way I can control this width ???

Is there some ways how can I send an Parameter to jQuery function ?

thank you.

Is This A Good Question/Topic? 0
  • +

Page 1 of 1