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 - qbsoft

Pages: [1]
1
Bug Report / Re: The deletRow function operates abnormally.
« on: February 15, 2021, 01:52:45 pm »
Here is stackblitz url: https://web-platform-uaer86.stackblitz.io/

Check the check button and click the delete button located in the upper left corner.

The remote server is not ready. So I did local paging using json data. It's deleted normally like this.

But I don't do local paging, I do remote paging. So I think there is a problem with remote paging.

Is there an example of multi-deletion from a grid using remote paging?

2
Bug Report / The deletRow function operates abnormally.
« on: January 29, 2021, 03:43:58 pm »
Hello.

I checked the abnormal operation of the deleteRow function.

The data I am testing is a list of 5 pages in total.
DeleteRow works normally on page 1 and 2.
However, it works abnormally on pages 3, 4, and 5.

The phenomenon is not deleting the selected row, but deleting the first row on the current page unconditionally.

The code I used is as follows.

Code: [Select]
var rowList = grid.Checkbox("state").getCheckedNodes().map(function (rowDataObj) {
            var rowIndxObj = grid.getRowIndx({ rowData: rowDataObj });
            return { rowIndx: rowIndxObj.rowIndx };
        });
        console.log(rowList);
        grid.deleteRow({ rowList: rowList });

The rowIndx stamped on the console is displayed correctly.

However, the first row is deleted unconditionally.

Please help me.

3
Help for ParamQuery Pro / Re: About the addRow method.
« on: January 29, 2021, 10:17:55 am »
Thank you.  :)

I implemented what I wanted using 'editable callback function'.

4
Help for ParamQuery Pro / About the addRow method.
« on: January 28, 2021, 05:58:28 pm »
Hello

I have a question about the addRow method.



If you look at the attached screenshot, the first column (not the check box) is editable: undefined.
So it can't be modified.

What I want is that the first column can also be modified in the row created through the addRow method.
The other row should still be non-modifiable.

What should I do?

5
Thank you for suggesting a solution. Unfortunately, it has not been resolved.

But I found the cause and solution.
The cause is setSelection of the complete function.
After commenting on this part, it was processed normally when the number of lists was 0.

The code that I uploaded yesterday has changed a little bit, but the context is similar.
I have processed to call setSelection only when the number of lists is greater than 0.

Code: [Select]
function funcMainComplete(evt, ui) {
        var listCount = this.pageData().length;

        if (listCount > 0) {
            var rowIndxPage;

            if ($("#hidMainRowIndxPage").val() == undefined || $("#hidMainRowIndxPage").val() == "") {
                rowIndxPage = 0;
            } else {
                rowIndxPage = Number($("#hidMainRowIndxPage").val());
            }

            this.setSelection({ rowIndxPage: rowIndxPage });
        }
    }

6
Hello.

My sentence can be weird because I used a translator.
Please excuse me.

There is no problem when there is more than one search result.

I didn't ask for so many requests in a row.
When there are zero search results, the request is automatically generated continuously.







This is my code.

I don't know how to use JSfiddle, and I can't provide JSfiddle because my development environment is still only done locally.

Code: [Select]
function funcMainComplete(evt, ui) {
    var rowIndxPage;

    if ($("#hidMainRowIndxPage").val() == "" || $("#hidMainRowIndxPage").val() == undefined) {
        rowIndxPage = 0;
    } else {
        rowIndxPage = Number(rowIndxPage);
    }

    this.setSelection({ rowIndxPage: rowIndxPage });
}

function funcMainRowSelect(evt, ui) {
    if (ui.addList.length > 0) {
        $("#hidUk").val(ui.addList[0].rowData[0]);
        $("#hidMainRowIndxPage").val(ui.addList[0].rowIndxPage);
       
        $("#btnSave").data("mode", "U");
        $("#btnDelete").prop("disabled", false).removeClass("disabled");
    }
}

$(document).ready(function () {
    var gridObj_Provider = {
        showTop: false,
        locale: "ko",
        selectionModel: {
            type: "row",
            mode: "single",
            toggle: false
        },
        scrollModel: {
            autoFit: true
        },
        pageModel: {
            type: "remote",
            rPP: 15,
            rPPOptions: [15, 30, 50, 100, 1000, 10000]
        },
        editable: false,
        complete: funcMainComplete,
        hWrap: false,
        wrap: false,
        height: 630,
        dataModel: {
            location: "remote",
            recIndx: "0",
            dataType: "JSON",
            contentType: "application/json; charset=utf-8",
            url: "/Proc/QbGrid.aspx",
            getData: function (response) {
                return {
                    curPage: response.Data.CurPage,
                    totalRecords: response.Data.TotalRecords,
                    data: response.Data.List
                };
            },
            postData: function () {
                var obj = {
                    gubun: "R",
                    qbgrid_query_template_code: "Provider",
                };
                var searchConditionArr = $("#frmSearch").children().get();
                if (searchConditionArr.length > 0) {
                    searchConditionArr.forEach(function (el) {
                        obj[$(el).attr("name")] = $(el).val();
                    });
                }
                return obj;
            },
            error: function (jqXHR, textStatus, errorThrown) {
                console.log("error");
                console.log(jqXHR);
                console.log(textStatus);
                console.log(errorThrown);
            }
        },
        colModel: [{
                dataIndx: "state",
                maxWidth: 30,
                minWidth: 30,
                align: "center",
                resizable: false,
                hidden: true,
                title: "",
                menuIcon: false,
                type: "checkbox",
                cls: "ui-state-default",
                sortable: false,
                editor: false,
                dataType: "bool",
                cb: {
                    all: false, //checkbox selection in the header affect current page only.
                    header: true //show checkbox in header.
                }
            },
            {
                dataIndx: "0",
                hidden: "true"
            },
            {
                title: "코드",
                dataType: "string",
                dataIndx: "1",
                hidden: false,
                halign: "center",
                align: "center",
                hvalign: "center",
                valign: "center"

            },
            {
                title: "공급사명",
                dataType: "string",
                dataIndx: "2",
                hidden: false,
                halign: "center",
                align: "center",
                hvalign: "center",
                valign: "center"

            },
            {
                title: "연락처",
                dataType: "string",
                dataIndx: "3",
                hidden: false,
                halign: "center",
                align: "center",
                hvalign: "center",
                valign: "center"

            }
        ],
        rowSelect: funcMainRowSelect,
        hoverMode: "row"
    };
    var qbgrid_Provider = pq.grid("#divQbgrid_Provider", gridObj_Provider);
});


Quote
Please include the localization file and this is controlled by the localization string: strNoRows.

I am using the localization file.
I just want to prevent data requests from occurring continuously when there are zero search results.

Thank you.

7
Hello.

Remote data requests occur continuously when the number of lists(result from remote data) is zero. I don't know why remote data requests keep happening.

I want to stop the non-stop Remote data requests.

And if the number of remote data is zero, I want to show that 'there is no data' on the grid.

What should I do?

This is my environment.
language: C#, ASP.NET Webform (not MVC)

And Response data: {TotalRecords: 0, CurPage: 1, List: []}

Pages: [1]