Kwex
Kwex

Reputation: 4020

jqGrid - Make column name label different from its corresponding field name

I.e. I want the field name "Firstname" to have an asterisk in it to denote a compulsory e.g. "*Firstname", but I don't want the main grid column name to have asterisk in it too.

Clicking the Edit button pops up a form with the asterisk it in, but this also appears on the Grid when viewing the resultset.

Can someone advise on a way around this?

Thanks.

This is what I've currently got that doesn't solve my problem.

colNames: ['*Firstname']
colModel:[{ name: 'Firstname', index: 'Firstname', label: 'Firstname', width: 150, editable: true, editrules: { required: true} }]

Upvotes: 2

Views: 2362

Answers (1)

Oleg
Oleg

Reputation: 221997

If you set some prefix or suffix for the column name in the Edit form you should use corresponding formoptions instead of the colNames or label property in the colModel.

Upvotes: 2

Related Questions