1

an user has a password and it is required by add a user, but on edit-action a password is not required, but can be changed.

Is it possible to do this with jqgrid?

degressor
  • 358
  • 4
  • 16

1 Answers1

1

You can change the value of required property of the editrules inside of beforeShowForm (see here). You can use setColProp for example to do this. For example to set required: true in the 'password' you can call

$("#grid").jqGrid('setColProp', 'password', {editrules: {required: true}});

inside of beforeShowForm.

Community
  • 1
  • 1
Oleg
  • 220,925
  • 34
  • 403
  • 798