Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Hiding data in a grid

    We're trying to load data in a grid but we want one or two of the columns to be invisible to the user. I tried setting the width of those columns to 0 but it didn't work. Can anyone tell me how to hide the columns?


    Code:
    //SubDomain Grid
    isc.ListGrid.create({
        ID: "groupGrid",
        title: "groupGrid",
        top: 600,
        left: 50,
        width: 800,
        height: 100,
        alternateRecordStyles: true,
        showAllRecords: true,
        canEdit: false,
        //contextMenu: specialRatesGridContextMenu,
       fields: [{
       		name: "domainId",
            title: "domainId",
            width: 0
        }, {
       		name: "groupId",
            title: "groupId",
            width: 0
        }, {
       		name: "groupName",
            title: "groupName"
        }, {
            name: "description",
            title: "description",
            width: 175
        }, {
            name: "sanitized",
            title: "sanitized",
            width: 175,
            editorType:"checkbox"
        },
        {
            name: "groupRole",
            title: "Group Role",
            type:"comboBox",
            valueMap : {
    		"Estimator" : "Estimator",
    		"Pricing Lead" : "Pricing Lead"		           
    		},
    		defaultValue:"Estimator"
        }
        
        ],
        canReorderFields: true,
        canSort: true,
        autoDraw: false,
        autoFetchData: false,
        dataSource: DomainGroupDS,
        recordDoubleClick:"handleGroupDoubleClick()",
        listEndEditAction:"done",
        //enterKeyEditAction: "done",
        //listEndEdit: "stop",
        //initialCriteria: vCriteria,
        canEdit: false,
    
        click: function () {
        	//alert('hello');
    //    	var record1=groupGrid.getRecord();
    //    	alert(record1);
            //recordClick: "loadGrid(CERGrid, {CER_CODE:record.code})",
            var record = groupGrid.getSelectedRecord();
            
            var fieldValue = record.groupId;
    
    
            mDomainId = record.domainId;
            mGroupId = record.groupId;
            
            //alert(fieldValue);
            participantGrid.filterData({groupId:fieldValue});
    		//alert({domainId:record.code});       
        }
    });

    #2
    hi darkling235,

    Please use showIf:"false" to hide column.
    For example:
    {name: "domainId",
    title: "domainId",
    showIf:"false"
    }


    Vikram

    Comment


      #3
      That worked great. Thanks a lot

      Comment

      Working...
      X