Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Setting Interactive Grid Column width separately in Apex 24.1

AR KappilFeb 4 2025 — edited Feb 4 2025

Could someone please help me fix the column width separately for each column based on the data it holds? Is there a way to achieve this? By the way, I am using APEX 24.1. I have added the following JavaScript code (courtesy of Mr. John in this forum) in the 'Execute When Page Load' section, but it sets the width for the entire column in the region. However, I need to set the width separately for each individual column. Kindly note that I am using multiple tabs in my Interactive Grid, and each tab contains a different number of columns in the grid

----- javascript given
let igView = apex.region("my_region").call("getViews").grid.view$,
colArray = [];

colArray = igView.grid("getColumns");
for (let i=0; i < colArray.length - 1; i++) {
let col = colArray[i];

col.width = 300;  

}
igView.grid("refreshColumns").grid("refresh");

Thanking you in anticipation.

Comments
Post Details
Added on Feb 4 2025
3 comments
72 views