In jqgrid, Is it possible to use select formatter without setting editoptions?

StackOverflow https://stackoverflow.com/questions/7803658

  •  25-10-2019
  •  | 
  •  

سؤال

Since one of my jqgrid column is not editable,so I do not set required value info i.e.{value:"1:John;2:Smith"} to editoptions, instead, I set formatter:select and value info to formatoptions. When I look at the js sourcecode of select formatter it tightly coupled with editoptions especially for getting "multiple" property of it. Is it possible to achieve this without writing custom formatter?

formatter:select
formatoptions:{value:"1:John;2:Smith"}

data being sent to this column is "1" or "2", and I expect from jqGrid to display John or Smith.

thanks, Alper.

هل كانت مفيدة؟

المحلول

You are right, that the code of the select formatter could be improved to use opts.colModel.formatoptions.multiple in the line in the same way as it will be used opts.colModel.editoptions.multiple in the line of code.

Nevertheless I don't think that it's a real problem. If you has no editable property in the column or if you has editable: false the column stay non-editable even if you use editoptions.

So I agree you that the usage of formatoptions.multiple would be better, but I think that it's "nice to have" problem only.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top