Question

Change limit for number of rows showed by default in detail

Hello team. 

To enhance user experience we have a need to change the number of rows showed by default in detail. By default in the system it's 10 rows, if detail has more records - button "Show more" is shown. We would like to change this value from 10 to 5.

I've tried to set value of RowCount within the detail (as proposed in ansvers to this post https://community.creatio.com/questions/display-all-records-detail-instead-showing-show-more-button) but this solution doesn't work for me.

 

initDetailOptions: function () {
                this.set("RowCount", 5);
 }

Please, advice.

Like 0

Like

2 comments
  1. I assume you're adding this to the detail, not the page the detail is on, correct? 
  2. Also, I typically add this in the detail's init and it always works for me, like this:
init: function() {
	this.callParent(arguments);
	this.set("RowCount", 5);
}

Ryan 

Ryan Farley,

Hi Ryan,

 

Where abouts does the above code go on the details page as I could not get it to work

 

Sample code.

 

define("UsrSchemae67e8701Detail", ["ConfigurationGrid", "ConfigurationGridGenerator",
    "ConfigurationGridUtilitiesV2"], function() {
    return {
        entitySchemaName: "UsrBudgetPeriod",
        attributes: {
            "IsEditable": {
                dataValueType: Terrasoft.DataValueType.BOOLEAN,
                type: Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
                value: true
            }
        },
        mixins: {
            ConfigurationGridUtilitiesV2: "Terrasoft.ConfigurationGridUtilitiesV2"
        },
        methods: {
            onActiveRowAction: function(buttonTag, primaryColumnValue) {
                this.mixins.ConfigurationGridUtilitiesV2.onActiveRowAction.call(this, buttonTag, primaryColumnValue);
            }
        },
        diff: /**SCHEMA_DIFF*/[

Show all comments