【问题标题】:change label text Add Form in jqgird更改标签文本在 jqgrid 中添加表单
【发布时间】:2014-06-02 16:33:18
【问题描述】:

我正在尝试更改StudentOrEmployeeId 的标签文本,当前为“名称”。我的更改事件正在运行,但无法更改名称。我可能遗漏了什么

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, },

【问题讨论】:

    标签: jqgrid


    【解决方案1】:

    colModelformoptionslabel 属性可用于指定添加/编辑表单的标签。

    【讨论】:

    • 对不起,在一列下拉值的更改事件上,我需要更改另一列标签的标签,而不是列标题文本
    猜你喜欢
    • 2011-04-19
    • 1970-01-01
    • 1970-01-01
    • 2013-08-09
    • 2012-08-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多