开发者

Apply CSS to table cells (td) in JQGrid?

Is there any way to apply a specific CSS class to all cells in a given col开发者_如何学运维umn in a JQGrid?


Based off the documentation, looks like you can give columns specific classes when setting up your colModel:

jQuery("#grid_id").jqGrid({
    ...
    colModel: [
        { name: ..., classes: "col1", ... },
        { name: ..., classes: "col2", ... },
        ...
    ],
    ...
});

Then you should be able to just style as normal, eg:

td.col1 { background-color: #f00; }


We are sorry for that. We have now implemented the functionality you need, and it is available through the CssClass property off the column, e.g.

Code:

<trirand:JQGridColumn DataField="City" CssClass="cityClass" ... />

When you do that, the "cityClass" css class will be applied to all cells in the "City" column. We have updated our ASP.NET download, please re-download from there:

http://www.trirand.net/download.aspx

and replace your Trirand.Web.Dll with the one available in the .zip download.

Please, let us know if this helps. If you need anything else, just let us know and we will quickly add it to the product.

Regards, Rumen Stankov Trirand

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜