jQWidgets Forums

jQuery UI Widgets Forums Grid Grid Column header image has to Change

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 12 years, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Grid Column header image has to Change #8750

    sreeni379
    Member

    Hi Dimitar,

    how to change Column header images. this following code wrote ,it is not working .

    My code is when page changed the column images to change ,here i have two images  Uncheck, and Check images.

    Here i am  using following code is not working or it not change image

         $("#Injqxgrid").bind("pagechanged", function (event) {
    
                    debugger;
                    var args = event.args;
                    var pagenum = args.pagenum + 1;
    
                    var val22 = (jQuery.inArray(pagenum, pagenumber));
    
                       if (val22 == 0) {
    
                            $('#Injqxgrid').jqxGrid('setcolumnproperty', 'InSelect', 'text', 'CheckBox', 'renderer', headercheckboxRenderer11);
    
                            var headercheckboxRenderer11 = function (value) {
                                debugger;
                                var dummyClass = 'image-checked'
                                var html1 = '<span style="margin-top:5px;margin-right:10px;margin-left:12px;margin-bottom:10px;float:left">';
                                html = html + '<img class =" ' + dummyClass1 + '"  src="../../Content/jqwidgets/styles/images/Check.png" /> </span>';
                                return html;
                            }
                        }
                        else {
    
                            $('#Injqxgrid').jqxGrid('setcolumnproperty', 'InSelect', 'text', 'CheckBox', 'renderer', headercheckboxRenderer22);
    
                            var headercheckboxRenderer22 = function (value) {
                                debugger;
                                var dummyClass2 = 'image-unchecked'
                                var html = '<span style="margin-top:5px;margin-right:10px;margin-left:12px;margin-bottom:10px;float:left">';
                                html = html + '<img class =" ' + dummyClass + '"  src="../../Content/jqwidgets/styles/images/UnCheck.png" /> </span>';
                                return html;
                            }
                    }
    
                }
    Thanks
    Sree
    Grid Column header image has to Change #8780

    Dimitar
    Participant

    Hello Sree,

    As you can see in the jqxGrid API, the setcolumnproperty method receives only four parameters, but you set more. The correct statement is as follows:

    $('#Injqxgrid').jqxGrid('setcolumnproperty', 'InSelect', 'renderer', headercheckboxRenderer11);

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.