We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6298
    • 13 Posts
    The DataGrid Widget works a treat, loading all records from a table or just specific records from the table if an sql query is used:

    e.g. by adding to the the "default value" field box:

    @SELECT * from modx_tablename where fieldname=’red’;

    Can the DataGrid Widget be configured to allow a user browsing the page to search the records shown by the DataGrid Widget, or to sort the records?

    Any feedback or guidance appreciated!
      • 1535
      • 84 Posts
      I too would like to see more examples of the use of the DataGrid Widget. It looks to have great potential, but I find it very hard to use and sparse on documentation.

      Cheers,

      Andreas
        • 6298
        • 13 Posts
        I did find an alternative to using the DataGrid Widget (http://modxcms.com/MakeTable-622.html), but without coding expertise could not customse the example code kindly provided.
          • 22303 MODX Staff
          • 10,725 Posts
          Yes, MakeTable is aimed at PHP developers who want a quick way to turn database results into tabular format, with paging and other features. But it is just one approach to doing this sort of thing in MODx; I posted another here recently. The DataGrid is just not for me, and I know very little about it honestly. I do think it should be removed from the core, and become a true add-on; but that won’t happen until 0.9.7 is released.
            • 6298
            • 13 Posts
            Thanks for info, I’ll have another go!