Skip to main content
Answer

Need help to understand how to modify the HTML for a grid field in MUI

  • November 12, 2025
  • 2 replies
  • 29 views

Joe Schmucker
Captain II
Forum|alt.badge.img+3

If I want to modify the html for a custom field in a grid view, I am not sure where to do it.

Example scenario:

I created a custom field in the GLTran table UsrNSCustomer.  In the Modern UI editor (in Project Editor), I add the field to the view.

This is the field I added as it shows in the editor.

 

the typescript file is generated.  Now the field shows in the grid when I publish the customization.

 

import {
PXFieldState
} from "client-controls";

import { GL301000, GLTran } from "src/screens/GL/GL301000/GL301000";

export interface GL301000_GreenSparkGLUDF_generated extends GL301000 {}
export class GL301000_GreenSparkGLUDF_generated {}

export interface GLTran_GreenSparkGLUDF_generated extends GLTran {}
export class GLTran_GreenSparkGLUDF_generated {
UsrNSCustomer: PXFieldState;
}

The html in the editor does the job of pulling this field onto the grid using the gridDetails id.

    <qp-tab id="tabTransactions" caption="Details">
<qp-grid id="gridDetails" view.bind="GLTranModuleBatNbr" wg-container="GLTranModuleBatNbr_grid"></qp-grid>
</qp-tab>

I see that information in the GL301000.html file in frontendsources\screen\scr\screens\GL\GL301000.html.  

However, I don’t see any HTML where the grid fields are shown.  They are obviously pulled from the GL301000.ts file.  

How do I modify the HTML for my custom field?  For example, I would like to make the field a web link by adding control-type="qp-link-editor" to the field.  I can do it easily for a non-grid field right in the Modern UI editor, but I can’t see where I can do it when the field is in a grid view.

I’m trying to find where GLTranModuleBatNbr_grid is defined.

Thanks in advance for tips!

 

 

 

 

 

 

Best answer by aleksandrsechin

As far as I know, there is probably no proper way to modify a grid fields directly in HTML, except by using some bad-practice approaches.

In my opinion, there is enough functionality to develop grid fields in TypeScript using decorators. For example, to make a field a web link, you can specify:

@linkCommand("ViewItem")
@columnConfig({ allowUpdate: false })
ItemID: PXFieldState;

Here, ViewItem is your PXAction defined in the BLC.

To insert custom fields into the base grid at a specific position, you can use the following decorator, where Selected is the base field after which you want to place your custom field:

@placeAfterProperty("Selected")
UsrMyField: PXFieldState;


Hope this helps.

If you have another task related to grid fields, feel free to share it — we can try to find a solution together.

2 replies

Forum|alt.badge.img+3
  • Jr Varsity I
  • Answer
  • November 13, 2025

As far as I know, there is probably no proper way to modify a grid fields directly in HTML, except by using some bad-practice approaches.

In my opinion, there is enough functionality to develop grid fields in TypeScript using decorators. For example, to make a field a web link, you can specify:

@linkCommand("ViewItem")
@columnConfig({ allowUpdate: false })
ItemID: PXFieldState;

Here, ViewItem is your PXAction defined in the BLC.

To insert custom fields into the base grid at a specific position, you can use the following decorator, where Selected is the base field after which you want to place your custom field:

@placeAfterProperty("Selected")
UsrMyField: PXFieldState;


Hope this helps.

If you have another task related to grid fields, feel free to share it — we can try to find a solution together.


Joe Schmucker
Captain II
Forum|alt.badge.img+3
  • Author
  • Captain II
  • November 13, 2025

Thank you ​@aleksandrsechin.  This is exactly what I wanted to know!!