Forum Academy Marketplace Showcase Pricing Features

Table headers / column names for repeating group rendering

Is there any way to present table header rows as part of the repeating group’s functionality. This might be a little difficult considering the way in which tabular data is displayed but I thought it was worth asking. Everyone is so used to having table headers that it seems strange to not have them present. As a suggestion, perhaps the actual fields (text, inputs, or groups we input in the repeating groups) placed into a repeating group could have another attribute called “column name” or “header text” (etc.)? Then when the table data is rendered the first row could be this column name/header text value; then on the second row the data could start. It could also be made optional in case there are people who do not want the columns.

Thanks for listening.

3 Likes

As far as I know only the Excel plugin has headers

I would have thought it wasn’t too hard to just build your own header ?

Copy and paste your repeating group above the dynamic one, set it to fixed single row.

2 Likes

That’s what I usually do

Thanks @raymond and @NigelG. From my experience, that solution works in fixed width tables but in responsive tables, I’m not having success. As the page gets wider the table columns begin to offset from header columns because they aren’t under the same table. I guess this is the region for my suggestion about having it part of the repeating region.

Are you by chance successful with headers in a responsive design? If so, could you share what exactly you are doing? Thanks.

3 Likes

I haven’t tried it in responsive mode. The app I was going to use it in got canned by the client. Would be interesting to see what solutions are out there.

1 Like

Hmmm yes that might make it more awkward.

I wonder if there is a way to merge in the headers into the RG data ?

1 Like

Thanks @NigelG. My suggestion in the original text was this same thought. If the headers were the first row output then they would correctly resize with the table.

The only potential issue I see with this is when it comes to sorting the repeating group. You could hack it with fudging the data, but without a “sort everything after the first row” type of thing, it could get messy.

1 Like

True, that’s fair. One way around this could be to sort the data then render the header after the table data is rendered. Just a thought.

1 Like

Yes. I can’t think of another way to do it. Although maybe you could do something with a condition to replace the first row of a RG with something that had a header ?

So the first cell is formatted differently to the rest.

1 Like

So I have a hack for this…

I started composing a reply asking for any progress on this and as I was typing it came to me…

To solve this issue, we did the following:

  • Create the repeating group and customize the first group with the text, images, buttons, etc…

  • Once you have completed the design, then copy and paste the entire repeating group - we renamed the new one RG Header

  • Change the number of rows in RG Header to 1 and adjust the height to the desired height of your header.

  • Move this RG Header to directly above our original group

  • Bold all the text fields in RG Header

  • Add a row to the table through Data / App Data that contains the values you’d like to use in your header. After adding this information, get the uniqueid for it.

  • Change the data source on RG Header to be exactly the same “Search for …” except add criteria to match the uniqueid with the uniqueid you for the row you added

This should solve your problem.

A couple of side notes:

  • You may need to exclude this header row from the rest of your “Search for…” data otherwise it will show up. For us, this didn’t matter because we show data relevant to each user and this header row we created was assigned to no users.

  • I tried to get the header to show just by showing “text” instead of “Search for…” data but then the repeating group would have no rows of data and just collapse. Not ideal because then your header disappears. If someone can resolve this, then we can save a data retrieval call.

Enjoy.

Richard

9 Likes

Nice explanation. I do almost the same

Interesting. I’ll try this out. Thanks.

Hey @rmadison Thanks for elaborate answer. How does point number 4 above work if you already set a field type to say, date or location?

When I do this I still get jarbled up information when the screen is stretched.

1 Like

Hi all. Did anyone solve this?

I tried hard on this one. Could not get it figured out.

The second repeating group works on small screens but on wide screens it doesn’t.

It would be good if there was a way to just use the thing type data field as a static caption above each cell/column.

1 Like

If only it was C#, I could use my adaptive grow only row sizing on scroll method, but alas it is not meant to be
:pensive:

Private Sub DataResults_Scroll(ByVal sender As Object, ByVal e As System.Windows.Forms.ScrollEventArgs) Handles DataResults.Scroll
        'Turn off Autosize, only used during the first data load.
        DataResults.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.None
        'Get the preffered width for displayed data against each column and compare to current width
        'Set the new column width only if greater than current
        For Each column As DataGridViewColumn In DataResults.Columns
            If column.GetPreferredWidth(DataGridViewAutoSizeColumnMode.DisplayedCells, True) > column.Width Then
                column.Width = column.GetPreferredWidth(DataGridViewAutoSizeColumnMode.DisplayedCells, True)
            End If
        Next
    End Sub

Yes, I query this too because I have some fields that are numeric. This means I can’t create a record with text headings. Suggests that this method works but only if all fields in the record are text …?