3 Replies Latest reply on Nov 18, 2008 4:36 AM by Newsgroup_User

    DataGrid mxml question.

    ctzn99 Level 1
      When I declare a datagrid in mxml, clearly I can also declare the columns.

      I'm working on created my own custom grid class that inherits from DataGrid but, when I try to declare it in mxml I can no longer use mxml to define the grid columns.

      I dug through DataGrid.as looking for some sort of meta data that described what was allowed in mxml or something but couldn't find anything.

      Anyone else tried to do this before?

      Regards,
        • 1. Re: DataGrid mxml question.
          Level 7

          "ctzn99" <webforumsuser@macromedia.com> wrote in message
          news:gfkll2$m4l$1@forums.macromedia.com...
          > When I declare a datagrid in mxml, clearly I can also declare the columns.
          >
          > I'm working on created my own custom grid class that inherits from
          > DataGrid
          > but, when I try to declare it in mxml I can no longer use mxml to define
          > the
          > grid columns.
          >
          > I dug through DataGrid.as looking for some sort of meta data that
          > described
          > what was allowed in mxml or something but couldn't find anything.
          >
          > Anyone else tried to do this before?

          <yourNameSpace:columns>
          <!--datagrid columns-->
          </yourNameSpace:columns>

          You can see that in action here:
          http://flexdiary.blogspot.com/2008/09/extended-datagrid-with-stylefunction.html


          • 2. Re: DataGrid mxml question.
            ctzn99 Level 1
            Thanks Amy!

            I knew it was something simple like this, and in fact, I had finally had a chance to dig through some flex code I wrote almost 2 years ago and sure enough that's exactly what I did. Brain is to full, it needs a nudge in the right direction now and then.
            • 3. Re: DataGrid mxml question.
              Level 7

              "ctzn99" <webforumsuser@macromedia.com> wrote in message
              news:gft3im$8ch$1@forums.macromedia.com...
              > Thanks Amy!
              >
              > I knew it was something simple like this, and in fact, I had finally had a
              > chance to dig through some flex code I wrote almost 2 years ago and sure
              > enough
              > that's exactly what I did. Brain is to full, it needs a nudge in the
              > right
              > direction now and then.

              You're welcome.