Is this the proper way to assign a border to a cell for the first column in the table?
$(gridContentTable).find("tbody tr td[cellIndex=" + (frozenColCount - 1) + "]").css("border-right", freezeColStyle);
Edit: More info:
This works for the first cell in the header:
$(tableHeaderCol).eq((frozenColCount - 1)).css("border-right", freezeColStyle);
I’m defining the variables with this:
function getGridInfo() {
gridHeaderTable = grid.find(".t-grid-header table");
gridContentTable = grid.find(".t-grid-content table");
tableHeaderGroupCol = $(gridHeaderTable).find("colGroup col");
tableHeaderCol = $(gridHeaderTable).find("tbody tr th");
tableContentGroupCol = $(gridContentTable).find("colGroup col");
totalColCount = $(tableHeaderGroupCol).length;
}
Only the header has the CSS applied, the content of the table does not. And this will ultimately do the first cell of each row in the first column.
Thanks.
“:eq” gives you the nth element in the set. “:nth-child” gives you each nth child in the set.
http://jsfiddle.net/5BmGU/