Share some wisdom? :)

Share some wisdom? :)

TheSisbTheSisb Posts: 18Questions: 0Answers: 0
edited November 2012 in General
I started working on my own grid because I have very specific needs and couldn't get it working in datatables.
Before I go any further with my grid I was wondering if you guys could share some words of wisdom and maybe things I should account for before I get too far.

Here's where I'm at so far:
http://www.thesisb.com/grid/

Features:
-fluid table
-table footer
-resizeable columns
-pagination
-sorting
-ajax (JSON) data source
-N columns freezing from both sides
-Handlebarsjs templates for table building and redraws
-Cell editing

Building a grid is a ton of work. It's impossible to foresee what issues may arise, and at this point I'm beginning to see them rolling in from all sides at once.

Replies

  • allanallan Posts: 63,534Questions: 1Answers: 10,475 Site admin
    The biggest challenge I've faced with DataTables with the table / cell widths. A cross browser nightmare and it almost never quite done what is needed. I think after 5 years of teaching I've got that core functionality of DataTables down to what I want it to be, but it doesn't support anything like resizable columns. I have a few ideas for how that might be done in DataTables (table-layout: fixed specifically), but if that is fundamental to your grid you might want to consider using divs for layout - but in turn that makes a fluid layout harder...

    Allan
  • TheSisbTheSisb Posts: 18Questions: 0Answers: 0
    I can imagine. I'm using "box-sizing:border-box;" and floating my table cells to the left. Luckily I only need to support IE8 +. The box-sizing property is really helpful in making things align/be sized the way they should.

    I thought about using divs, but they aren't semantically correct and I like the table markup structure. To get around N columns freezing on the left and right side, I split my table into three tables: leftTable, centerTable, rightTable; the pro is that I can absolutely position the left and right tables, the con is that the back-end data has to split up the data appropriately before converting it into the JSON.
    I think I could do the calculations in the front-end, but to me it seems more like a back-end job.

    Thanks for the wisdom, it made me think to check my table in other browsers (and noticed a few bugs).
This discussion has been closed.