Author Topic: Filter not visible  (Read 2570 times)

svk123

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 9
    • View Profile
Filter not visible
« on: May 22, 2014, 02:17:33 pm »
Hi,

I am trying to show local header filter in my PQgrid which I am opening in a dialog box. Data model is local. AccData contains JSON data. Grid is visible. However, local header filters are not visible. I also did not understand the $.ajax call in your demo. If the data is available locally (in ACCdata), are you bringing the data again from the server with the filter applied or is it going to filter locally at the client side without a server trip?

    var gridDetailModel = {
        height: 300,
        width: 280,
        pageModel: { type: "local" }, //, rPP: 5, strRpp: "" },
        dataModel: {
            data: accData,
            location: "local",
            sorting: "local",
            dataType: "JSON",           
            sortIndx: "Accode",           
        },
        colModel: [
            { title: "Account Code", width: 80, dataIndx: "Accode",
                filter: { type: 'textbox', condition: 'begin', listeners: ['keyup'] } },           
            { title: "Description", width: 200, dataIndx: "AcName",
                filter: { type: 'textbox', condition: 'begin', listeners: ['keyup'] } }           
        ],
        editable: false,       
        freezeCols: 0,
        flexHeight: false,
        flexWidth: true,
        numberCell: { show: true },
        filterModel: { on: true, mode: "AND", header: true, type: "local" },
        title: "Account Details",
        showTop: true,
        showBottom: false,
        draggable: true,
        scrollModel: {horizontal: false }
    };
         
        var $gridMain1 = $("#grid_json1").pqGrid(gridDetailModel);
         $("#grid_json1").hide();
         $("#grid_json1").dialog({ autoOpen: false }); // Initialize dialog plugin
         $("#grid_json1").dialog( "option", "width", 400 );
        $("#grid_json1").dialog("Open");

Thanks,
SVK