How to : Increase the height of the grid in D365FO forms

A common requirement in D365FO form design is increasing grid height to cut down on scrolling. This includes standard forms. Changing any property on the form desing doesnt seems to work for many cases. Where it doesnt work at design time. It can be fixed by changing the code for runtime. Below is the simple code change:

void  run()
{
    next run();
    FormGridControl periodGrid; //Grid Contorl
    periodGrid = PeriodStatisticGrid as FormGridControl; // PeriodStatisticGrid is the control name.

     if (periodGrid)

    {
        periodGrid.visibleRowsValue(15); //setting the value to show 15 records.
    }
}

Hope this will be helpful.

Comments

Popular posts from this blog

How to: Get ledger dimension from string in D 365 FOE

How to: Use enum values instead of integers in BI reports for Dynamics 365 finance and operations

How to: Import Bank statements from Azure file storage to Dynamics 365 finance and operation using Power automate (formally flow)