[Data Grid] Screen navigation -Data Grid

Forge Component
(31)
Published on 6 Nov (7 days ago) by OutSystems R&D
31 votes
Published on 6 Nov (7 days ago) by OutSystems R&D

Hi,

I have two screens A and B, where screen A has grid container list ,one of the grid column holds the id ,on click of the id it should navigate to Screen B. This screen B has input variable.How to pass the input variable for this screen B on click of this id.

Please let me know how to proceed.

Thanks,

Pavani

Solution

Hi Pavani,

you could take a look at this example consumer of the data grid component, see the Data Grid Sample module in it.  Column called 'Link' on SamplesFlow/Grid screen.

What you do is :

First make sure the REST call that is used to populate your grid, returns the URL you want to link to.  For examle if your target screen is B and it takes in BId as a parameter, that would probably be something like 

GetOwnerURLPath() + "B.aspx?BId=" + BEntity.Id

or in the sample application it is :


Then you just add a Columns/GridColumnLink to your GridContainer, set the property JSONField to this URL attribute coming from your REST API, and also set the Title to one of the (other) attributes coming out of your REST API so there is something to click on in your link column.  (in your example above that would be the id)


See also attached oml, where i made a small demo DataGrid with a link to a supplier detail screen I created with the default OS scaffolding.

Hope this helps you,

Dorine


Solution

Hi Dorine,

Thank You for your time and the solution is very clear.

Can you tell me how to adjust the width of the field with default value.


Thanks,

Pavani