Skip to main content
Code Review

Return to Revisions

3 of 3
replaced http://stackoverflow.com/ with https://stackoverflow.com/

Small recommendations:

  1. It seems to me that you can remove async: false parameter for the $.ajax call.
  2. You can remove result.data from the data returned by the ajax call. (After that you should and the line with var colD = result.data). The data will be not really used because you call trigger('reloadGrid'); immediately.
  3. On the other side the values for sortname and sortorder parameters should be included in the data model (as the properties of result).
  4. You can use url: secondFetchURL, datatype: 'json', mtype: 'POST' parameters directly in the jqGrid definition ( in $("#myGrid").jqGrid({/*here*/});. No trigger('reloadGrid') will be needed.

UPDATED: Look at this and this answers. Probably the approach is what you need from the dynamic columns.

You can take a look in the answer in case if you will need to use custom formatters.

Oleg
  • 166
  • 2
  • 5
default

AltStyle によって変換されたページ (->オリジナル) /