2015-05-01 181 views
-1

我有其中列顯示在Dojo網格狀如何根據單選按鈕選擇

var formFields = [{ 
    name: 'Cost', 
    placeHolder: '', 
    required: true, 
    type: 'currency', 
    column: 'Cost', 
    friendlyName: 'Cost', 
    width: 80 
}, { 
    name: 'CompareAtPrice', 
    placeHolder: '', 
    required: true, 
    type: 'currency', 
    column: 'CompareAtPrice', 
    friendlyName: 'Compare At Price', 
    width: 150 
}] 

我想根據單選按鈕選擇要隱藏這些列對某些用戶的aspx頁面顯示或隱藏的列。

+0

需要對你所要求的更多信息。請看[guidelines](http://stackoverflow.com/help/how-to-ask) – detheridge02

回答

0

你可以試試下面的代碼片段。

//radioButton is the radioButton widget 
 
dojo.connect(radioButton, "onChange", function(newValue){ 
 
     //grid stands for the grid widget here. 
 
     if(radioButton.get('checked')){ 
 
      grid.layout.setColumnVisibility(index, newValue); //Assign the index value here . Ex: 0 
 
     } 
 
});

感謝 Srikant

相關問題