J
Jeremy Chapman
I've got a grid inside a div so that it's got scroll bars around it.
What I want to do is have the header row fixed at the top, so that the
vertical scroll bars scroll just the data rows of the grid while the
horizontal scroll bar scrolls both the data and the header row.
The only way I can think of doing it is putting the data portion as a
seperate grid in a div and the header in a seperate div. I would force the
header div not to have scroll bars, and use javascript on the horizontal
scrollbar of the data div to move the header so that it always lines up with
the data grid's columns.
My question is, what would the javascript look like?
What I want to do is have the header row fixed at the top, so that the
vertical scroll bars scroll just the data rows of the grid while the
horizontal scroll bar scrolls both the data and the header row.
The only way I can think of doing it is putting the data portion as a
seperate grid in a div and the header in a seperate div. I would force the
header div not to have scroll bars, and use javascript on the horizontal
scrollbar of the data div to move the header so that it always lines up with
the data grid's columns.
My question is, what would the javascript look like?