Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - BigMark

Pages: [1]
1
Hi Sir!
    Thank you for your reply!But I'm not sure your answer.
    Can you give me an example of completed?
    I'm not quite sure how to cover the front of the '$(obj_ID).pqGrid("createTable", obj);'
    I'm really confused!
    Looking forward to your reply!
    Thank you very much!
   
     

2
Help for ParamQuery Grid (free version) / How to refresh the summary row?
« on: January 18, 2014, 11:37:46 pm »
Hi Sir:
    The part of  the code is as below:

  function LoadGridWithSummary(obj_ID, url, colM, sort, PageSize, topVisible, summaryData) {
    GetRowIndex = -1;
    var dataModel = {
        location: "remote",
        sorting: "remote",
        paging: "remote",
        dataType: "JSON",
        method: "GET",
        curPage: 1,
        rPP: PageSize,
        sortIndx: 0,
        sortDir: "up",
        rPPOptions: [20, 30, 40, 50, 100, 500, 1000],
        getUrl: function () {
            var orderField = (this.sortIndx == "0") ? "" : sort[this.sortIndx];
            var sortDir = (this.sortDir == "up") ? "desc" : "asc";
            if (this.curPage == 0) {
                this.curPage = 1;
            }
            return {
                url: url,
                data: "pqGrid_PageIndex=" + this.curPage + "&pqGrid_PageSize=" +
                    this.rPP + "&pqGrid_OrderField=" + orderField + "&pqGrid_OrderType=" + sortDir + "&pqGrid_Sort=" + escape(sort)
            };
        },
        getData: function (dataJSON) {
            if (dataJSON == null && dataJSON.totalRecords <= 0) {
                showTipsMsg("No Data!", 5000, 5);
            }
            return { curPage: dataJSON.curPage, totalRecords: dataJSON.totalRecords, data: dataJSON.data };
        }
    };
    if (!IsNullOrEmpty(topVisible)) {
        topVisible = false;
    }
    var $summary = "";
    $(obj_ID).pqGrid({
        dataModel: dataModel,
        colModel: colM,
        editable: false,
        topVisible: topVisible,
        oddRowsHighlight: false,
        columnBorders: true,
       
        freezeCols: 0,
        rowSelect: function (evt, ui) {
            GetRowIndex = ui.rowIndxPage;
        },
        render: function (evt, ui) {
            $summary = $("<div class='pq-grid-summary'  ></div>").prependTo($(".pq-grid-bottom", this));
        },
        cellSave: function (ui) {
            //$(obj_ID).refresh();
        },
        refresh: function (evt, ui) {
            //var data = [summaryData, ["Second row for testing", "row", "for", "testing"]]; //2 dimensional array.
            var data = [summaryData]; //2 dimensional array
            var obj = { data: data, $cont: $summary };
            $(obj_ID).pqGrid("createTable", obj);
        }
    });
    $(obj_ID).pqGrid('refresh');
    pqGridResize(obj_ID, -52, -4);
}
   
  When Incoming the parameter of  summaryData ,the summary row was not changed!
   why?
   Thanks!

BigMark



3
Hi Sir:
     I find a problem!
     The part of  source code is as below:

            obj.colModel = [
                {
                    title: "<input type='checkbox' class='header_chk' onclick='SelectAll(this);'   />",
                    dataIndx: "state", width: 30, align: "center", sortable: false,
                    type: 'checkBoxSelection', cls: 'checkboxColumn', resizable: false,
                    render: function (ui) {
                        var rowData = ui.rowData, dataIndx = ui.dataIndx;
                        var val = rowData[dataIndx];
                        str = "";
                        if (val) {
                            str = "checked='checked'";
                        }
                        return "<input type='checkbox' " + str + " />";
                    }, className: "checkboxColumn"
                }]
     

when Scroll down, before the selected of the rows will become unselected?
     I'm really confused....

     Thanks!

4
Hi Sir:
     Please see my demo below:
     http://jsfiddle.net/BigMark/D23V9/7/
     I put a check box in a column heading  to control the checkbox.
     But When I select the checkbox of column heading,all the checkboxs are selected, that's not what I want.
I want to select the rows of the current page.
How can I do? thanks a lot !
 

5
Hi Sir:
    How can I get that how many   rows of the curPage ?
   
   



6
hello ,请问版主,当你选中行以后,鼠标一滚动,会不会使原先选中的行,全部失去选择,就好像刷新了一样?


Pages: [1]