Hi, I tried to make a grid caption in two lines, first I added a
tag to the title of the header

 

 

but the second line was hidden somewhere behind the table elements.
Then I added my own CSS (a copy of InnerListedGridHtmlGeneratorCSS.css)

added padding-bottom: 60px to the fixed-captions-wrap class and it made it two-line, but
now it overlaps the first lines of the list.

 


Can you advise me on how to fix this or any other way to make the labels span two lines?

 

 

.fixed-captions-wrap-width(@scrollWidth) {
    .fixed-captions-wrap {
        width: calc(~"100% - @{scrollWidth}");
    }
}
.grid.grid-listed.inner {
    @fixed-header-height: 37px;
    padding-top: @fixed-header-height;
    .listed-grid-line:not(:last-child) {
        border-bottom: 1px solid #e5e5e5;
    }
    .fixed-captions-wrap .grid-captions {
        box-shadow: 0 1px 1.9px 0.1px rgba(0, 0, 0, 0.28);
    }
    .listed-grid-line {
        display: flex;
    }
    .grid-listed-row {
        margin: 0;
        padding-top: 6px;
        padding-bottom: 6px;
    }
    .fixed-captions-wrap {
        z-index: 1;
        position: absolute;
        top: 0;
        left: 0;
        height: @fixed-header-height;
        overflow: visible;
        background-color: white;
        width: 100%;
        padding-bottom: 60px;
    }
    .grid-captions.fixed-header {
        position: absolute;
        padding-top: 9px;
        padding-bottom: 5px;
        font-size: 13px;
    }
    label {
        font-size: 1em;
    }
    .grid-scroll {
        overflow: auto;
    }
    .grid-bottom-spinner-space {
        position: relative;
    }
}
Like 0

Like

0 comments
Show all comments

Hi!

I need a custom button that will change value in a recaord and then save this record. I've tried it on a OpportunitySectionV2 with this code

 

define("OpportunitySectionV2", [], function() {
	return {
		entitySchemaName: "Opportunity",
		details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
		diff: /**SCHEMA_DIFF*/[ 
            {
                "operation": "insert",
                "parentName": "ActionButtonsContainer",
                "propertyName": "items",
                "name": "MainContactSectionButton",
                "values": {
                    itemType: Terrasoft.ViewItemType.BUTTON,
                    caption: { bindTo: "Resources.Strings.OpenPrimaryContactButtonCaption" },
                    click: { bindTo: "onOpenPrimaryContactClick" },
                    "layout": {
                        "column": 1,
                        "row": 6,
                        "colSpan": 1
                    }
                }
            }]/**SCHEMA_DIFF*/,
		methods: {
			prepareResponseCollectionItem: function(item) {
				this.callParent(arguments);
         		if (item.get("MgtImportantFlg") === false){
					item.customStyle = Ext.apply({}, {
					  "background-color": "#cc081c",
					  "font-family": "cursive"
					}, item.customStyle);		  		
		  		}
			},
			onOpenPrimaryContactClick: function(){
				var activeRow = this.get("ActiveRow");
				var bFlag = this.get("GridData").get(activeRow).get("MgtImportantFlg");
					if(bFlag){
						this.get("GridData").get(activeRow).set("MgtImportantFlg",false);
						this.save();
					}
					else{
						this.get("GridData").get(activeRow).set("MgtImportantFlg",true);
						this.save();
					}
			}
		}
	};
});

it change the value in my field but didn`t save it, so after reload shows old value.

Could anyone help me how should i change code for my purposes?

Like 0

Like

1 comments
Best reply

Hello,

In the section module, it is better to use an UpdateQuery class to change the value of the records. You can find the example here.

Hello,

In the section module, it is better to use an UpdateQuery class to change the value of the records. You can find the example here.

Show all comments