jqGrid for Twitter Bootstrap

Narendra V picture Narendra V · Feb 19, 2013 · Viewed 21.2k times · Source

I am working website, where I am using CSS framework "Twitter Bootstrap". Along with that I am using jqGrid for showing the grid data, but the problem is that jqGrid depends on jQuery UI, which conflicts with Bootstrap styles. Has anyone used jqGrid with jQuery UI and Bootstrap successfully?

Any examples/links are highly appreciated.

Thanks, Naren

Answer

Gonzalo picture Gonzalo · Feb 19, 2013

You can use "Datatables" for Bootstrap

http://www.datatables.net/blog/Twitter_Bootstrap_2

or simply Bootstrap table styles

http://twitter.github.com/bootstrap/base-css.html#tables

But if you want to use jqGrid anyway, you must add that css classes to resolve some style conficts

input.ui-pg-input {
    width: auto;
    padding: 0px;
    margin: 0px;
    line-height: normal
}
select.ui-pg-selbox {
    width: auto;
    padding: 0px;
    margin: 0px;
    line-height: normal
}