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

  • Home
  • SEARCH
  • 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 9182107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:28:56+00:00 2026-06-17T18:28:56+00:00

I have a datagrid control I am working on that uses a total of

  • 0

I have a datagrid control I am working on that uses a total of 4 tables to generate fixed column headers, column headers, fixed cells and cells (top-left, top-right, bottom-left, bottom-right with the bottom ones scrolling vertically and the right ones scrolling horizontally). The alignment between some of the tables (in this case the fixed cells [vertical] and the non-fixed column headers [horizontal]) must be synchronized with the table on scroll and the header-widths are calculated from hidden headers within the table holding the data. This works great even for very large (100k+ row) datasets – except when initially loaded. The table is dynamically generated (via an AJAX callback) and I’m looking for a method, preferably in JQuery to call a custom render() function that resizes headers after the table is created and initially rendered by the browser (just being inserted isn’t enough, it must be after the browser has handled all the text metric/border/padding/margin calculations and initially rendered the table so the proper widths can be pulled from it).

TL;DR: Need an event or some hack that will allow me to call a function after a table’s contents have been rendered for a table that has been created dynamically through DOM or JQuery calls (preferably not so hacked together as a setTimeout call).

  • 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-17T18:28:57+00:00Added an answer on June 17, 2026 at 6:28 pm

    Had to solve this by creating a setTimeout that called a function repeatedly checking for a change in size as below (some code excluded that isn’t directly related):

    function Datagrid() {
        var _this = this; setTimeout(function () { _this.CheckAutoColumns(); }, 20);
    }
    function Datagrid_CheckAutoColumns() {
        if (this != null) {
            var render = false;
            for (var i = 0; i < this.Columns.length; i++) {
                if (this.Columns[i].__LastWidth != this.Columns[i].Container.width()) {
                    render = true;
                    break;
                }
            }
            if (render == true) { this.Render(); }
            if (this.Disposing === false) { var _this = this; setTimeout(function () { _this.CheckAutoColumns(); }, 20); }
        }
    }
    Datagrid.prototype.constructor = Datagrid;
    Datagrid.prototype.CheckAutoColumns = Datagrid_CheckAutoColumns;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem with a data-bound DataGrid control, in that despite each column
I am working on a WPF datagrid custom control, where i have a Day
i working on asp.net & C# i have datagrid that contain my database. i
I am working with WPF DataGrid. I have to drag the Column Header, drop
We have a custom DataGrid control that dynamically generates columns determined by an XML
I have a databound Silverlight DataGrid control that I am trying to sort. I
While working on my Silverlight4 SketchFlow prototype I have a datagrid that has a
I am working on WPF, I am designing a control that contains a datagrid,
I have a DataGrid control that has a TextColumn <DataGrid ItemsSource={Binding Path=Dvm.Data} Name=GrdName AutoGenerateColumns=False
I have a DataGrid and I need to add an Expander control dynamically to

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.