【问题标题】:JQGrid - td title change on ok of popup boxJQGrid - 弹出框的 td 标题更改
【发布时间】:2015-08-28 07:57:31
【问题描述】:

我在jqgrid 中有可编辑的行。双击textbox,会弹出textarea的弹框。

单击弹出窗口的OK 时,我需要将textarea 值返回到jqgrid 行单元格,从该单元格调用双击。

单元格的值在tdtitle 属性内。

我尝试使用rowid 更改标题属性,但jqgrid 单元格没有反映我的新值。

tr='#'+top_id;
$(tr).find('td[aria-describedby="Remarks"]').attr('title','txtremark.value');

它还显示了开发人员工具中更改的值,检查元素。但是单元格值没有改变。

我尝试在 ok click 事件上重新加载网格,并且,onloadcomplete 网格事件再次设置 title 属性。但问题仍然相同。 请指导我。

【问题讨论】:

    标签: javascript jquery jqgrid


    【解决方案1】:
        I got an answer of this.. On jqgrid's ondblClickRow event I set a title attribute to popup textbox as below.
    
        txtremark.value = $(tr).find('td[aria-describedy="Remarks"]').attr('title');
    
        Then, on Ok button click event i reload jqgrid,
        and after that on LoadComplete event again I set attribute of title and also set html of title like,
    
    
    
    
    
    loadcomplete : function(){
            tr ="#" + rowid;
            $(tr).find('td[aria-describedy="Remarks"]').attr('title',txtremark.value);
            $(tr).find('td[aria-describedy="Remarks"]').html(txtremark.value);
            $("divremarks").dialog('close');
            });
    
    
        Its compulsory to set html of td other wise next time you got undefined in popup window.
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-09-17
      • 2013-05-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多