Microsoft InfoPath 2010
The official blog of the Microsoft InfoPath team

Introducing Horizontal Repeating Tables

Introducing Horizontal Repeating Tables

  • Comments 6
InfoPath 2007 adds horizontal repeating table to the control toolbox for when you want data to be entered or displayed in a structured, tabular format, and when you want users to be able to add additional columns instead of rows.
 
For example, you might use a horizontal repeating table to collect sales data for each quarter:
 
Making it wrap
When designing your form template, horizontal repeating table looks like a composite control -- it’s made from a horizontal repeating section and layout tables (I'll cover horizontal repeating section in my next post). Horizontal repeating table can be configured to wrap or scroll. By default, it will wrap to the next line, to provide a better printing experience.
 
You can change the behavior of the control by resizing the layout tables; for example, to change the wrapping point, resize the rightmost border of the layout table:
 
 
This will allow only two instances of the repeating column to fit on one line; the next two will go to the next line, and so forth:
 
 
Making it scroll
You may want to set an upper bound on the amount of real estate that a horizontal repeating table can take up; in that case, you need to make the control scroll. User experience will then be similar to the following:
 
 
To achieve such behavior, you need to make the following modifications to your form template:
  1. Encapsulate the repeating section component of the horizontal repeating table in a scrolling region.
  2. Set the properties on the scrolling region:
    • Show horizontal scroll bars: always
    • Show vertical scroll bars: never
    • Wrap text: unset
    • Margins: all zero
    • Padding: all zero
    • Size: appropriate height and width
    • Borders: no borders
  3. Resize the rightmost border of the layout table that contains the horizontal repeating table to match the border of the scrolling region.
 
When you’re done, your form template will look similar to the following in Design mode:
 
 
Scrolling is often desirable for electronic forms, but is not ideal for printing. If you want to achieve both, you need to use scrolling in the view that users will see when filling out the form and wrapping in an associated printable view.
 
Data binding of a horizontal repeating table is identical to that of a regular repeating table or section.  Horizontal repeating tables support conditional formatting, data validation, rules, calculations, other InfoPath data features that a regular repeating tables support.
 
Note that horizontal repeating tables are only supported in InfoPath 2007 client.
 
- Alex Weinstein
Program Manager
Leave a Comment
  • Please add 6 and 1 and type the answer here:
  • Post
  • Very helpful.  So, what about the few of us still on 2003.  Any way to fake this.  Manually tweaking the layuot?
  • If your can use just one computer with InfoPath 2007 to design the form template, you can get the horizontal repeating table to work in forms that will be filled out in InfoPath 2003. You just need to save the form template in a format compatible with InfoPath 2003 (File | Save As will give you that option).

    Alternatives – hand-editing the XSLT to create the illusion of a horizontally repeating table – are possible, but are extremely error-prone and hard to maintain.
  • InfoPath 2007 introduces a new flavor of the repeating section control - horizontal repeating section....
  • This is great. There is one thing that I can't seem to get working though.

    The fields in my repeating table need to wrap/expand.  I cannot get the corresponding row containing the label to expand with it.

    Any ideas on a way to accomplish this?

  • Can we do this in InfoPath 2010?

    Thank you.

  • Hi Genius,

    Is it possible to have the Infopath 2010 Repeating Table Fields Vertical and allowing new items to be added as columns one after another......

    Please advice......

    Thanks & Regards,

    Thendral

Page 1 of 1 (6 items)