protected void updateGhostRow() {
int numGhosts = getGhostColumnCount();
if (numColumns > numGhosts) {
// Add ghosts as needed
for (int i = numGhosts; i < numColumns; i++) {
Element td = OverrideDOM.createTD();
DOM.setStyleAttribute(td, "height", "0px");
DOM.setStyleAttribute(td, "overflow", "hidden");
DOM.setStyleAttribute(td, "paddingTop", "0px");
DOM.setStyleAttribute(td, "paddingBottom", "0px");
DOM.setStyleAttribute(td, "borderTop", "0px");
DOM.setStyleAttribute(td, "borderBottom", "0px");
DOM.setStyleAttribute(td, "margin", "0px");
DOM.appendChild(ghostRow, td);
setColumnWidth(i, getColumnWidth(i));
}
} else if (numColumns < numGhosts) {
int cellsToRemove = numGhosts - numColumns;
for (int i = 0; i < cellsToRemove; i++) {
Element td = getGhostCellElement(numColumns);
DOM.removeChild(ghostRow, td);
}
}
}