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

Pages: [1]
1
Help for ParamQuery Grid (free version) / Re: linking to url in a cell
« on: October 31, 2013, 07:59:13 pm »
Perhaps this is what you are looking for:

Code: [Select]
var colModel = [
    { title: "Employee name", width: 200, dataType: "string", dataIndx: "EmployeeName" },
    { title: "Hired on", width: 150, dataType: "string", dataIndx: "DateTimeHired", render: function (ui) {
        var cellData = ui.rowData[this.dataIndx];

        if (cellData) {
            // Convert JSON DateTime e.g. /Date(2176326711)/ to yyyy-mm-dd format
            return deserializeJSONDateTime(cellData);
        }
    }
];

2
Hi, can you post more code of your dataModel? I have some options for you to try:

1. Does your actionresult return json?
Code: [Select]
return Json(result, JsonRequestBehavior.AllowGet);
2. Referring to the api:
Code: [Select]
getData: function( dataJSON, textStatus, jqXHR ){
    return { curPage: dataJSON.curPage, totalRecords: dataJSON.totalRecords, data: dataJSON.data };
}

It needs a certain structure to work properly, it needs the current page, total records and your data. When directly accessing your GridExample/Paging method(http://localhost/GridExample/Paging?cur_page=1&records_per_page=10&sortBy=yourColumn&dir=down), do you have a simular structure as http://paramquery.com/demos/pagingGetOrders?cur_page=1&records_per_page=20&sortBy=orderID&dir=asc&_=1364228721972?

Before returning data to your pqGrid by using getData function, you can always use 'console.log(dataJSON)' to check if the JSON object has data. In browser press F12 en go to console to see output. This may be even an easier to read option for checking data than going directly to url.

Please let me know if any of these options worked for you.

Pages: [1]