Jqgrid change the subject

How can I change the appearance of jqgrid without changing the stylesheet. I mainly use jqueryui to create my site, but I want to use different background images only for the grid. Is it possible?

+3
source share
3 answers

Is it that you want to apply several jQueryUI themes to one page and use jqgrid one of them, and use the other elements on your page?

You can see this page that discusses how to add a scope (I assume the easy way is to use a theme with a scope manually for your page, and jqgrid uses the default scope if you don't want to insert the jqgrid jquery extension code to find out how to use custom scope)

+3
source

, , , , , CSS, jQuery, , , , jQuery. javascript CSS jqGrid, jQuery .

, , , , , .

.jqgrid-widget { ... override widget styles ... }
.jqgrid-widget input, .jqgrid-widget select ...
.jqgrid-widget-content { ... override widget-content styles ... }


 $(function() {
     $('#myGrid .ui-widget').addClass('jqgrid-widget');
     $('#myGrid .ui-widget-content').addClass('jqgrid-widget-content');
     ...
 });
+2

( , ) jquery ui candy

/* Remove jquery-ui styles from jqgrid */
    function removeJqgridUiStyles(){
        $(".ui-jqgrid").removeClass("ui-widget ui-widget-content");
        $(".ui-jqgrid-view").children().removeClass("ui-widget-header ui-state-default");
        $(".ui-jqgrid-labels, .ui-search-toolbar").children().removeClass("ui-state-default ui-th-column ui-th-ltr");
        $(".ui-jqgrid-pager").removeClass("ui-state-default");
    }
+1

Source: https://habr.com/ru/post/1713778/


All Articles