change label text Add Form in jqgird

人走茶凉 提交于 2019-12-25 05:51:11

问题


I am trying to change the label text of StudentOrEmployeeId which is currently 'Name'. My change event is working but unable to change the name.May I am missing something

colNames: ['IssueType', 'Issued To','Name']
  { name: 'IssueType', index: 'IssueType', align: 'center', editable: true, edittype:  'select',
        editoptions: 
         {
          value: "0:Student;1:Teacher",
          dataEvents: [{
          type: 'change',
          fn: function (e) {
           if ($('#IssueType option:selected').val() == 0)                        
           {                           
          jQuery('tr#StudentOrEmployeeId > td.CaptionTD').html('Student Id')
            }
            else
           {                                       
           jQuery('tr#StudentOrEmployeeId > td.CaptionTD').html('Employee');
                              }
                              }
                            }], }
                      },
           { name: 'StudentOrEmployeeId', 'index': 'StudentOrEmployeeId', editable: true, },

回答1:


label property of formoptions of colModel can be used to specify the label of Add/Edit form.



来源:https://stackoverflow.com/questions/23999261/change-label-text-add-form-in-jqgird

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!