jquery - Consistent grid headers with Flexigrid ? -


So I'm trying to use the flexigrid plugin It seems that it works great differently from this fact It seems that you have to set the column width manually, otherwise the column headers do not match the body column.

Is there a way to automatically match these columns, while the length of the column's content (column) is the normal table behavior).

I am still working on it, too. What have I come up with in which to add an onsus headler and find out what is the maximum size of each column between the headers and the body, then determine the width of both the maximum for that column.

  grid.flexigrid ({... other setup ... onSuccess: function () {format ();}); }}); Function Format () {var gridContainer = this.Grid.closest ('flexigrid'); Var header = Grid container.fund ('div.hDiv table tr: first th: no (hidden)'); Var drags = gridContainer.find ('div.cDrag div'); Var Offset = 0; Var firstDataRow = this.Grid.find ('tr: first td: no (: hidden)'); Var column width = new array (first data row line); this. Grid.find ('tr') .ech (function () {$ (this) .find ('td: no (hidden)'). Each (function (i) {var colWidth = $ (this) External Wide () ; If (column column [i]] column width [i]  header bodywidth: header; firstDataRow.eq (I) .css ('width', realWidth); header.css ('width', realWidth); drags.eq (i) css ('left', offset + realwidth; offset + = real with;}}  

Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -