dynamic header and body.Inline editing alignment issue
dynamic header and body.Inline editing alignment issue
Hi,
I am using datatables, everything seems good. I have alignment issue when I do inline edit by clicking on a cell and on blur the edited value is updated. If the entered value is long, only that cell is aligned vertically but not the entire column including header.
I am binding both the header and body dynamically through jquery. So, I cannot fix the width and there are around 50 columns(which is not constant) and about 900 rows. Please help me how to take the maximum width size of a cell in a column after edit.
Thanks,
Durga V.
Answers
Hi,
Any idea to achieve this?
Thanks,
Durga V.
Can you link to a test case showing the issue please? It might be that you need to call
columns.adjust()
after the update, but the columns should align automatically after an edit.Allan
Note:The table is created dynamically using jquery.
TableFormation() will be called while rendering the table for the first time on load.
while rendering for the first time the width of header & body matches and no alignment issue. Once I click on any cell, increase or decrease the value's length. Then, only the entire column width is changed but header width is mismatched and cause alignment issues.
In which event should I call this table.columns.adjust().draw();? I tried calling this at
ie, once the focus of the cell changes. But table.columns is "undefined".
Regards,
Durga V.