2

Is there a way to refresh the edit form dialog to apply updated options on the grid made on the fly? Basically I need to change some properties when a dropdownlist value has changed, and then the dialog reflect those changes. For example, I update the property editable to hide a field.

container.jqGrid('setColProp', fieldName, { editable: false});

Is there any way to that?

BenMorel
  • 34,448
  • 50
  • 182
  • 322
JPP
  • 360
  • 6
  • 22

1 Answers1

0

You can set the column data in the postback sent when the grid is loaded. Set the url with the url property:

url: $("#BlendGrades").jqGrid({
    url: '/Storage/GreenStorage/SetSectionList?q=2&location.Id=' + '<%:Model.Location.Id%>',
    datatype: "json", .....
Mualig
  • 1,444
  • 1
  • 19
  • 42
mackjazzy
  • 48
  • 1
  • 8
  • I don't want to make a request to the server. In the edit form dialog when the user change a dropdownlist value some fields have to disappear and anothers have to appear and i make that using that line of code but the dialog form has to be reload with the new settings – JPP Jul 02 '12 at 13:46
  • Then you can use the afterclickPgButtons option see this answer http://stackoverflow.com/questions/4645787/jqgrid-show-hidden-column-in-form-view/4651561#4651561 – mackjazzy Jul 02 '12 at 13:54