Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #108632
    edwardsmarkff
    Participant

    hello – i have had much success using grid dynamically, as opposed to using:

    Smart(  "#grid",   class  { get properties() {

    https://codepen.io/edwardsmarkf/pen/OJryKmB

    i have determined out how to load most grid elements dynamically.

    however, getting groupBy to work dynamically is more difficult.

    just using ordinary grid.groupBy = ['val']; does not work as you can see in my example.

    i see options available like grid.grouping.groupBy ,grid.groupHeader, and grid.groupByCommand() but i am not sure how to use any of these.

    may i ask how to proceed?

    (side note: i am sort of surprised there are not more examples for doing grid dynamicall since this is VERY useful!)

    #108633
    edwardsmarkff
    Participant

    got it:

    grid.grouping.groupBy = ['productName'];
    grid.grouping.enabled = true;
    grid.grouping.expandMode = true;
    grid.columns[2].visible = false;

    not sure if this is documented anywhere, but the chrome-console helped me to find this by reverse-engineering a working grid-group example.

    using grid dynamically is incredibly powerful.  i hope that smart-elements starts to provide examples of dynamic-grid.  i believe that others would find it exceptionally useful.

    #108636

    Hi,

    Thank you for your feedback!
    If you have any questions, do not hesitate to contact us!

    Best Regards,
    Svetoslav Borislavov

    Smart UI Team
    https://www.htmlelements.com/

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.