View/Set DataGrid Column IDs in the IDE Properties Tab

Continuing the discussion from Reusing RowTemplates:

Currently, the only way I have found to get the column IDs for a data grid is to copy them from a component that has already been pasted in to that column.

It would be super awesome if you could view and / or set the Column IDs in the IDE just like you set the column name and key.

Being able to set them would be the first prize since it makes it easy to use that information. But even just being able to see the column ID would be excellent.

This would be especially useful if you are replacing the repeating panel in the data grid with a linear panel since you don’t have a predefined datarow template but could still set your component columns.

1 Like

If you’re using git to get a local copy of your source code, you can find the column ids in your form’s .yaml file. Partial listing from one of mine:

- type: DataGrid
  properties:
    role: null
    columns:
    - {width: '330', title: U.S. Standard Asset Class, id: TGNTOU, data_key: descr,
      expand: false, $$hashKey: 'object:18563'}
    - {width: '90', title: '% of Total', id: VCOHDP, data_key: ratio, expand: false,
      $$hashKey: 'object:18564'}
    - {id: CQXDMF, title: 'Dividends Included?', data_key: includeDividends, $$hashKey: 'object:53108',
      width: '160', expand: false}
    auto_header: true
    tooltip: ''
    border: ''
    foreground: ''
    rows_per_page: 5
    visible: true
    wrap_on: never
    show_page_controls: true
    spacing_above: none
    spacing_below: none
    background: ''
  name: data_grid_1
  layout_properties:
    col_widths: {}
    grid_position: WDAWTG,AOVKNY
  components:

As a workaround, in theory, you could edit them, and push them back into Anvil…

But your approach, via the IDE, would be much safer, and doesn’t require fiddling with git.

1 Like