代码之家  ›  专栏  ›  技术社区  ›  Severin

如何在剑道UI网格中加宽弹出窗口?

  •  0
  • Severin  · 技术社区  · 7 年前

    在答案中 How do I Change window size on kendo grid editor template?

    1 回复  |  直到 7 年前
        2
  •  0
  •   Severin    7 年前

    jQuery("#grid").kendoGrid({
      ...
      edit: function(e){
        kendoUi_popUpEditWindow_setWidth('950px');
      },
      ...
    })
    

    function kendoUi_popUpEditWindow_setWidth(width){
      if(typeof(width) != "string" || (width + '').indexOf("px") == -1 ){
       width = "800px";
      }
      left = (jQuery( window ).width() - parseInt(width)) / 2;
      left = left + "px";
      jQuery(".k-widget.k-window").css('left', left);
      jQuery(".k-edit-form-container").attr('style', 'width:' + width);
      jQuery(".k-edit-form-container .k-edit-field").children().attr('style', 'width:100%');
    }