سؤال

I want to add some label in my Jqgrid form in ADD mode....so is there any way to add some text which is not belong to any Control of the form enter image description here

so what should I written for this funcnality...does it possible or not?

please show me some example regarding this Thankyou

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

المحلول

One way around the problem is to use your own editing form, instead of the one built into jqGrid. You will have full control over the form content, but at the price of having to write the code specifically for your application.


Alternatively, you can specify Form Options for any column which can add text or HTML content before or after a field, as well as other options. For example:

colModel: [ 
      ... 
      {name:'price', ..., 
       formoptions:{elmprefix:'(*)', rowpos:1, colpos:2....}, 
       editable:true },
      ...
   ]

The options you may be most interested in are:

  • elmprefix - string - If set, a text or html content appears before the input element
  • elmsuffix - string - If set, a text or html content appears after the input element

Although these options are specified for each column, you might be able to make some creative use of this to make it appear a label does not belong to a column. For example, by inserting HTML <br /> elements or such.

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