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
- I assume you're adding this to the detail, not the page the detail is on, correct?
- 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*/[
Rob Watson hello,
But you don't have a code in the detail schema, there is no init method override in the methods object in your schema. The method override should be added directly to the detail schema. I just tested it - works correctly both for the regular detail and the detail with an editable list.
Steve DeYoe,
Yes, Ryan provided a working solution, please apply it in your code.