1 Reply Latest reply on Mar 6, 2008 4:10 PM by ntsiii

    Hyerplinks on alternate rows in flex

      I have a flex screen embedded in html page. In that screen, i have a datagrid and i need to have hyperlinks on alternate rows of the data.
      Is it possible in flex to have hyperlinks on alternate rows by defining some property in flex? If anyone has faced similar issue before and have some pointers, pls let me know.

      Thanks in advcane
        • 1. Re: Hyerplinks on alternate rows in flex
          ntsiii Level 3
          This is not simple.

          first, you will need a custom item renderer that has a hyperlink mode and a normal mode.

          The mode must be set in the itemRenderer, either in a set data() override, or better, in the commitProperties() function after calling invalidateProperties().

          If the mode is really determined by the row position, make sure your itemRenderer implemts the IDropIListItemrenderer interface, and use the listData() to get the row index. Using the modulus operator, you can determine odd/even rows, and set the mode accordingly.

          Like I said, not simple, but definitely doable.