Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7822459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T07:55:51+00:00 2026-06-02T07:55:51+00:00

I was looking to fix the jqgrid column header and fixed footers. When there

  • 0

I was looking to fix the jqgrid column header and fixed footers. When there are other items along with jqgrid with data I was looking at fixing the header so that the user knows at all the time what he is looking at.

Here is the sample for what I am looking for

Note that here I am looking at browsers scroll bar.
Does jqgrid support this?

Edit

As JQGrid is html table after all, I tried to use jQuery TH Float Plugin.
Now it turns out that JqGrid is made of three tables
One for the header, one for the data and the other for the footer. So it seems that I either have to modify thfloat to accommodate this or come up with something else…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T07:55:52+00:00Added an answer on June 2, 2026 at 7:55 am

    This was a tough nut to crack.

    I got it working by
    First css override the default which is overflow:hidden to

    .ui-jqgrid .ui-jqgrid-sdiv{overflow:visible;}
    .ui-jqgrid .ui-jqgrid-hdiv{overflow:visible;}
    

    On the javascript JQuery came to my rescue I implemented the following

    function screenBottom() {
        return $(window).scrollTop() + $(window).height();
    }     
    $(window).scroll(function () {
            var dataTableTop = dataTable.offset().top;
            var dataTableHeight = dataTableTop + dataTable.outerHeight();
            var windowTop = $(window).scrollTop();
            var windowBottom = screenBottom();
            //Scroll down         
            if (windowTop > dataTableTop - headerTable.height()
                    && windowTop < (dataTableHeight - headerTable.height())) {
                headerTable.offset({ top: windowTop, left: headerTable.offset().left });
            }
            //For footer
            if (windowBottom > dataTable.offset().top + footerTable.outerHeight()
                    && windowBottom < dataTableHeight + footerTable.outerHeight()) {
                footerTable.offset({ top: windowBottom - footerTable.outerHeight(), left: footerTable.offset().left });
            }
            //Re adjust of the movement is too fast
            if (windowTop < (dataTableTop - headerTable.height())
                && dataTableTop < (headerTable.offset().top + headerTable.height())) {
                headerTable.offset({ top: dataTable.offset().top - headerTable.height(), left: headerTable.offset().left });
            }
            if (windowBottom > dataTableHeight + footerTable.outerHeight()) {
                footerTable.offset({ top: dataTableHeight, left: footerTable.offset().left });
            }
    
        });
    

    And then to check the footer and header while resizing the window

            $(window).resize(function () {
                setInitializeHeadersAndFootersPosition();
            });
    function setInitializeHeadersAndFootersPosition() {
                var dataTableTop = dataTable.offset().top;
                var dataTableHeight = dataTableTop + dataTable.outerHeight();
                var windowTop = $(window).scrollTop();
                var windowBottom = screenBottom();
                if (windowBottom > dataTableTop && windowBottom < dataTableHeight) {
                    footerTable.offset({ top: windowBottom - footerTable.outerHeight(), left: footerTable.offset().left });
                }
                if (footerTable.offset().top < dataTableHeight && windowBottom > dataTableHeight) {
                    footerTable.offset({ top: dataTableHeight, left: footerTable.offset().left });
                }
                if (windowTop > dataTableTop && windowTop < dataTableHeight) {
                    headerTable.offset({ top: windowTop, left: headerTable.offset().left }); //Header does not need the offset
                }
            }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am looking since yesterday to fix this problem, I know there are plenty
I am looking for algorithms & data structures one would use to fix broken
I'm looking for a way to show jqgrid with search toolbar pre-filled and data
I'm looking to find a solution that will 'freeze' or fix the title band
I am looking for a recommendation for a FIX library for .Net (C#). It
Looking to move data from a table A to history table B every X
Looking at adding some data graphing to a new iPhone app in development (ala
I'm looking for a way to fix and/or abstract away a comma-separated values (CSV)
I am looking at creating a configurable product that has various prices. Having looked
This may seem like a stupid question, but I've been looking everywhere to fix

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.