yelo
yelo

Reputation: 481

How to make multiple left columns fixed and scroll the the rest columns in HTML table?

I am having trouble of freezing multiple columns or column-group and making the rest columns scrollable.

I tried the solution like

how do I create an HTML table with fixed/frozen left column and scrollable body?

but it only works for one column. If I try to freeze multiple columns, they overlapped each other.

I also do not want to use multiple tables which will be difficult for dynamic data binding.

Does anyone know a simple solution for this case only using CSS?

Upvotes: 4

Views: 2540

Answers (1)

Yameen
Yameen

Reputation: 585

There is one jQuery Plugin "DataTable". This will help you to freeze any number of columns in your table.

Check the tutorials here. http://www.datatables.net/extensions/fixedcolumns/

http://www.datatables.net/release-datatables/extensions/FixedColumns/examples/two_columns.html

Hope this solves your problem.

Upvotes: 0

Related Questions