7 Replies Latest reply on Sep 18, 2006 11:35 AM by JB_Sound

    Formatting Repeater

    JB_Sound Level 1
      Is there a way to apply justification formatting to the repeater control (ie. right justified)?

      I want to use the repeater as an item renderer in a datagrid column. I have this working, except that I can't seem to apply justification to the way the repeater creates the individual items. I need to show the items either left aligned, center aligned, or right aligned.

      Is there a better way of achieving this with any other control?

      Thanks,

      JB
        • 1. Re: Formatting Repeater
          Renaun_Erickson Level 1
          Create an itemRenderer for the Repeater (ie: HBox) with the proper alignment you want. You'll want to make sure the width/height is set to the size of the dataGrid column which might be quirky if you are doing variable sized column cells.
          • 2. Re: Formatting Repeater
            JB_Sound Level 1
            Thanks, Renaun!

            I had discovered the same thing after looking at the width of the HBox I had stuck the repeater in. I forgot to put the width="100%'" in, which of course made it look like there was no formatting applied (other than leaving it sitting on the left side).

            BTW, what I found is that the width="100%" will work with the variable size of the dataGrid cell. Only problem is that if I won't allow the horizontalScrollPolicy that the content gets moved outside of the visible range of the column is smaller than the content of the repeater. I may have to explain more, but I'll find a way to deal with it too.

            I do appreciate the confirmation!

            JB
            • 3. Re: Formatting Repeater
              JB_Sound Level 1
              Thanks, Renaun!

              I had discovered the same thing after looking at the width of the HBox I had stuck the repeater in. I forgot to put the width="100%'" in, which of course made it look like there was no formatting applied (other than leaving it sitting on the left side).

              BTW, what I found is that the width="100%" will work with the variable size of the dataGrid cell. Only problem is that if I won't allow the horizontalScrollPolicy that the content gets moved outside of the visible range of the column is smaller than the content of the repeater. I may have to explain more, but I'll find a way to deal with it too.

              I do appreciate the clarifying confirmation!

              JB
              • 4. Re: Formatting Repeater
                JB_Sound Level 1
                Thanks, Renaun!

                I had discovered the same thing after looking at the width of the HBox I had stuck the repeater in. I forgot to put the width="100%'" in, which of course made it look like there was no formatting applied (other than leaving it sitting on the left side).

                BTW, what I found is that the width="100%" will work with the variable size of the dataGrid cell. Only problem is that if I won't allow the horizontalScrollPolicy that the content gets moved outside of the visible range of the column is smaller than the content of the repeater. I may have to explain more, but I'll find a way to deal with it too.

                I do appreciate the clarifying confirmation!

                JB
                • 5. Re: Formatting Repeater
                  JB_Sound Level 1
                  Thanks, Renaun!

                  I had discovered the same thing after looking at the width of the HBox I had stuck the repeater in. I forgot to put the width="100%'" in, which of course made it look like there was no formatting applied (other than leaving it sitting on the left side).

                  BTW, what I found is that the width="100%" will work with the variable size of the dataGrid cell. Only problem is that if I won't allow the horizontalScrollPolicy that the content gets moved outside of the visible range of the column is smaller than the content of the repeater. I may have to explain more, but I'll find a way to deal with it too.

                  I do appreciate the clarifying confirmation!

                  JB
                  • 6. Re: Formatting Repeater
                    JB_Sound Level 1
                    Thanks, Renaun!

                    I had discovered the same thing after looking at the width of the HBox I had stuck the repeater in. I forgot to put the width="100%'" in, which of course made it look like there was no formatting applied (other than leaving it sitting on the left side).

                    BTW, what I found is that the width="100%" will work with the variable size of the dataGrid cell. Only problem is that if I won't allow the horizontalScrollPolicy that the content gets moved outside of the visible range of the column is smaller than the content of the repeater. I may have to explain more, but I'll find a way to deal with it too.

                    I do appreciate the clarifying confirmation!

                    JB
                    • 7. Re: Formatting Repeater
                      JB_Sound Level 1
                      Thanks, Renaun!

                      I had discovered the same thing after looking at the width of the HBox I had stuck the repeater in. I forgot to put the width="100%'" in, which of course made it look like there was no formatting applied (other than leaving it sitting on the left side).

                      BTW, what I found is that the width="100%" will work with the variable size of the dataGrid cell. Only problem is that if I won't allow the horizontalScrollPolicy that the content gets moved outside of the visible range of the column is smaller than the content of the repeater. I may have to explain more, but I'll find a way to deal with it too.

                      I do appreciate the clarifying confirmation!

                      JB