开发者

Indent child elements of jqgrid group

Does anyone know how to indent the开发者_运维知识库 text of a child element of a group in jqgrid?


Sure, you can apply a cssClass to the column in the ColModel definition using the "classes" property:

colModel: [{ name: 'location', index: 'location', sorttype: "text", classes:"indentMe"}

Then you simply need the css defined like something similar to the below:

<style type="text/css">
        .indentMe
        {
            padding-left: 40px;
        }
</style>

You may run into issues with css order of loading, but if you drop that on your page itself, that usually takes care of it. In one case I had to edit the .ui-jqgrid tr.jqgrow td line in ui.jqgrid.css and bump out the padding: 0 2px; entry there for it to work as expected

Good Luck!

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜