Skip to main content
July 12, 2022
Solved

Reusable grid

  • July 12, 2022
  • 13 replies
  • 1 view

Hi.

I am attempting to make a reusable grid using a passed ri! of type Any with a cdt type being passed into it.

Optionally I am thinking about passing in a list of column names so I can specify the order the grid displays columns in.

From there I wanted to do a foreach generating the N grid columns using field names and types grabbed from the passed cdt..

1.I don't know if there is a way to get a list of all the fields a cdt type has.

2. I am unsure if there is a way to get their types.

Any tips?  

Best answer by mikes0011
I don't know if there is a way to get a list of all the fields a cdt type has.

a!keys()  -->

13 replies

mikes0011
mikes0011Answer
Brainy
July 12, 2022
I don't know if there is a way to get a list of all the fields a cdt type has.

a!keys()  -->

The Expression Guru
mikes0011
Brainy
July 12, 2022

FWIW, this sounds like a neat exercise but I don't expect that this level of "reusable grid" will be worth the effort you put into it, in a production-usable sense.  The read-only grid component is already easy enough to configure that it can basically just be designed as-needed, or if you have a use case where you need a bunch of different interfaces to use a similar one, then you can set up a reusable one under that slightly-narrower scope.

The Expression Guru
July 12, 2022

There are other bits of functionality I want to add in that increase its worth if reusably programmed.

Did not include them here was I wanted to keep the question simple.