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

Pages: [1] 2
1
Dear team,

I have followed your instruction and it works well. Thank you very much.

Best regards,
Nghiem Hoang

2
Hi pqgrid team,

I'm using inline editing feature of pqgrid. When users press tab from the cell that they want to edit, I will display a confirm dialog with yes/no button "Are you sure you want to save?".
If users click "No", I want pqgrid to reset value of that cell to the value before changed. How can I set value for the cell to the old value?

Thank you very much.

3
Thank you very much for replying.

4
Hi pqgrid team,

I'm developing the system for my company. We are using asp.net gridview, now I want to replace all asp.net gridview to pqgrid for the performance. But I don't know whether I can use pqgrid on the production environment. I have read about GPL v3 license in wiki but I'm still not sure about this.

Thanks and regards,
Nghiem Hoang

5
Thank you very much.
Now I can handle the button refresh with $( ".selector" ).on( "pqpagerrefresh", function( event, ui ) {} );

6
Hi all,

When the user clicks button refresh in the grid, I want to reload data and reset the grid to page 1 and rPP = 10 (current now I have rPPOptions: [10, 20, 50]). But when I click button Previous Page or First Page or select Records per Page, it also triggers refresh event.
So how to know which item triggers refresh event?

$("#ClaimsGrid").on("pqgridrefresh", function (event, ui) {
           
});

I tried to debug and found that $(event.currentTarget) always return the <div> of pqgrid.




7
Thank you very much. It works perfectly.

8
I try to debug and find that $(event.target) in rowSelect event returns the <div> of pqgird so $(event.target).closest("td.pq-grid-cell") will be empty. You can see in the attached file. So I try $(event.target).find("td.pq-grid-cell") and it returns many <td>, I don't know which td is selected item.



9
Thank you very much.
Now I can post to method GetMyClaimsWithSearch by using
dataModel.beforeSend = function (jqXHR, settings) {           
  jqXHR.setRequestHeader("Content-Type", "application/json");   
};

10
Could you please show me the code to get closest td parent element of $(event.target)? I don't know how to get it.
Thank you very much.

11
Although I set contentType in beforeSend method, Content-Type of Request Headers is always "application/x-www-form-urlencoded; charset=UTF-8" and I can't call method GetMyClaimsWithSearch

dataModel.beforeSend = function (jqXHR, settings) {           
  settings.contentType = "application/json; charset=utf-8";
};

Do I set anything else?

12
Hi all,

I have 5 columns like this
columnModel = [
                    { title: "Claim Number", width: 100, dataIndx: "ClaimNumber" },
                    { title: "Injured Worker's Name", width: 100, dataIndx: "WorkerName" },
                    { title: "Date of Injury", width: 100, dataIndx: "InjuryDate" },
                    { title: "Policy Number", width: 100, dataIndx: "PolicyNo" },
                    { title: "", width: gridWidth / 100 * 10, sortable: false, resizable: false, align: "center", render: ShowDetail }
                ];

var ShowDetail = function (ui) {
        var rowData = ui.rowData;
        var detail = '<a href="/Claim/ClaimDetails.aspx?claimNumber='
                  + encodeURIComponent(rowData.ClaimNumber)
                  + '"><span class="link">Detail</span></a>';

        return detail;
    }

and I use rowSelect event to load another grid.

claimGridObj = {                   
                    colModel: columnModel,                   
                    rowSelect: function (event, ui) {                     
                        var rowData = ui.data[ui.rowIndx];
                        LoadClaimHistoryGrid(rowData.ClaimNumber);
                    }
};

When user clicks on Detail column, it always call rowSelect event. So how to know which column selected in rowSelect event to prevent LoadClaimHistoryGrid when user clicks Detail column?

Thanks and regards

13
Hi all,
In the page ClaimPortalPage.aspx I have a method like this

[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public static string GetMyClaimsWithSearch(string caseManagerId, int selectedPage, int pageSize, string sortBy, string searchCondition)
{
   Get data and return json type
}

I use dataModel as below but I can't call GetMyClaimsWithSearch method, it's always call Page_Load()

dataModel = {
 location: "remote",
 method: "POST",           
 getUrl: function () {
               var data = '{ "caseManagerId":"' + caseManagerId + '"'
                    + ', "selectedPage":"' + this.curPage + '"'
                    + ', "pageSize":"' + this.rPP + '"'
                    + ', "sortBy":"' + sortIndx + "-" + sortDir + '"'
                    + ', "searchCondition":"' + claimSearchCondition + '"'
                    + ' }';
                var getObj = {
                    url: "/PortalPage/ClaimPortalPage.aspx/GetMyClaimsWithSearch",
                    data: data
                };
                return getObj;
            },
            getData: function (dataJSON) {                               
                return { curPage: dataJSON.SelectedPage, totalRecords: dataJSON.TotalRecord, data: dataJSON.data };
            }
        };

My question is how to call GetMyClaimsWithSearch method like jquery ajax post?

$.ajax({
 type: "POST",
 url: "/PortalPage/ClaimPortalPage.aspx/GetMyClaimsWithSearch",
 data: data,
 contentType: "application/json; charset=utf-8",
 dataType: "json",
 success: GetDataSuccess,
 error: GetDataFail
});               

And one more question, how to change Content-Type to "application/json; charset=utf-8"? Because I see the Content-Type of pqgrid when use method "POST" is "application/x-www-form-urlencoded; charset=UTF-8".

14
I found that pqgrid use the theme of jquery-ui  :)

15
Hi everyone,

I have a json data with these fields: EmployeeId, Name, DOB, Title
I want to sort data in client and by multiple columns (with order by sortedColumn, DOB, EmployeeId)
For example:
If sort by Name, data will order by Name, DOB, EmployeeId
If sort by Title, data will order by Title, DOB, EmployeeId
If sort by DOB, data will order by DOB, EmployeeId

How can I do this? Thank you very much



Pages: [1] 2