Adding and viewing data to a repeater


#1

Hi,

I’m starting out with repeaters but am stuck at the first hurdle! I need to create a table that will hold information about students (name, address, programme of study, etc)

I can add these column names and I can add the individual data for each student but I can’t figure out how to view the column names and the data that I have inputted.

I can get as far as altering the Item Loaded/Set Text value using the function icon and being able to insert variable or function which means I can choose from the list which column of data I want to see but I can’t figure out how to see all the columns with the column name displayed at the top (see screenshot)

Any help would be greatly appreciated!

Kind regards,
Pete

table


#2

I think it is easiest to have a header row separate from your repeater. Just place it right above the repeater widget. You can group them or include both in a dynamic panel if you need to show/hide or move it around as one unit.

The alternative is to include the column header titles as the first row in your repeater and if needed, style them differently using a conditional case in the Item Loaded event: "IF [[Item.isFirst]] equals “true” {apply header style} " … You have several options for how to apply that header style, including defining a “selected” style (in your example: bold, larger font, gray background, black border on bottom), or creating a dynamic panel with a default state (for your data) and “header” state, where you style widgets for your header row. This latter approach is better if your header row is to be taller than the data rows, because the height of the row will automatically adjust based on the height of the dynamic panel (as long as you check on the options for “Fit to Content in HTML” in the repeater’s style and “Fit to Content” in the dynamic panel.) Also be sure to note your [[Item.index]] values will be increased by 1 if you need to account for number of rows in your repeater. Sorting and filtering become more difficult to handle as well because you need to ignore your first (header) row. Like I said, easier to have header as a separate set of widgets outside your repeater.

If you upload your .rp source file I’d be happy to try applying an example for you.


#3

Hi,

Thanks so much for your help. Based on your advice I managed to get it working how I needed.

I do have another question about a different issue I’m trying to solve. Should I just post a new question?

Sorry, new to forum posting etiquette.

Regards,
Pete


#4

Yes, best to post new question as a new thread. Also best to try searching the forum to see if it has been addressed before (although the search engine is pretty poor, IMHO.)