2013-11-22 47 views
-1

代碼來構建wijgrid:如何設置Wijgrid的寬度?

// Construct the grid 
    $("#wijgridObject").wijgrid({ 
     allowPaging: true, 
     allowSorting: true,  
     pageSize: gridTotalRows, 
     pagerSettings: { position: "bottom" }, 
     allowColMoving: false, 
     columnResizing: false, 
     allowColSizing: false, 
     data: currentLayer.GridObjects, 
     showFilter: true, 
     rowStyleFormatter: function (args) 
     { 
      ... 
     }, 
     columns: gridColumnGroupings 
    }); 

我如何可以設置Wijmo格柵的寬度?礦似乎沒有自動灌裝與瀏覽器窗口的寬度....

的wijmo人usless大概還有設置wijgrid的寬度要像100%,沒有其他的話題

回答

-1
$("#wijgridObject").wijgrid("option", "pageSize", calculateGridHeight()); 

$("#wijgridObject").wijgrid("option", "pageSize", 256); 
0

獲取父elment的dimmensions

變種寬度= $( 「#parentElement」)得到(0).offsetWidth。 var height = $(「#parentElement」)。get(0).offsetHeight;

$( 「表」).wijgrid( 「的setSize」,寬度,heigth);

如果你想要的任何尺寸來自動設置使用「自動」的寬度或高度。