-1

i have an aspx page where the columns are shown in dojo grid like

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

I want to hide these columns for some users based on radio button selection.

laaposto
  • 11,835
  • 15
  • 54
  • 71
  • More information needed on what you are asking. Please look at the [guidelines](http://stackoverflow.com/help/how-to-ask) – detheridge02 May 06 '15 at 09:44

1 Answers1

0

You can try the following code snippet.

//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
        }
});

Thanks Srikant

Srikant Sahu
  • 839
  • 1
  • 6
  • 16