jaimi
|
 |
« on: January 28, 2015, 10:15:13 PM » |
|
Hi, I'd like to display/hide particular columns within a datagrid depending on a variables value. For example, when vSITE == 1 then display field OLT30A001T_KEY, otherwise hide it. How to? THX, Jaimi
----> $(function(){ var vPRK = $('#vPRK').val(); var vSITE = $('#vSITE').val(); var vCMD = $('#vCMD').val(); //alert(vPRK);
/********************************************************************************** edatagrid **********************************************************************************/ $('#edgNews').edatagrid({ title : 'Neuigkeiten', iconCls:'icon-Pferd', width:'100%', height:'auto', collapsible : 'true',
columns:[[ {field:'OLT30A001T_KEY',title:'PferdKey',width:080,sortable:'true',hidden:'true'} ,{field:'OLT30A003T_KEY',title:'NewsKey',width:080,sortable:'true',hidden:'true'} ,{field :'NWS_STATUS' ,title :'Status' ,width :060 ,sortable:'true' , align: 'center' ,editor : { type :'combobox' ,options:{ valueField:'KEY' ,textField:'NWS_STATUS' ,url:'pferd.lkp.nws.json' ,required:true ,editable:true ,prompt:'Status...' ,missingMessage: 'Wählen Sie den Status aus.' } }//editor ,formatter:function(value,row){return value;}//formatter } ...
|