Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Yarik Goldvarg 35 posts 84 karma points
    Sep 30, 2012 @ 12:15
    Yarik Goldvarg
    0

    DataType Grid 4.10

    Hello.

    I am using uComponents 4.10 + umbraco version 4.7.2

    I have a datatype grid with 3 fields.

    So i want to create a macro that wiil be render this grid  sorted by custom sort.

     

    I found the only one way to render values from the grid

       @foreach (uComponents.Core.DataTypes.DataTypeGrid.Model.StoredValueRow item in @Model.hpBanner)
          { 
              @item.Cells[0].Value
              @item.Cells[1].Value
              @item.Cells[2].Value
              @item.SortOrder
          }
    I think that is not so good to get values by index. Maybe i lost something?
    And also i want to render items by custom sort (sorted in back office grid) but i get always @item.SortOrder=0
    What i am doing wrong?
    Thanks


  • Ove Andersen 435 posts 1536 karma points c-trib
    Jan 05, 2013 @ 11:03
    Ove Andersen
    0

    Your problem with SortOrder sounds like an other issue I´m looking into. Will post back when it´s fixed.

    And you´re right, the current way of getting values is quite cumbersome and will be improved.

    If the sorting had worked, the items would be output from the @Model.hpBanner in the correct order without you having to do anything.

     

  • Ove Andersen 435 posts 1536 karma points c-trib
    Jan 31, 2013 @ 20:42
    Ove Andersen
    0

    Found the bug that made SortOrder 0 every time. Will be released in a patch (5.3.1) tomorrow.

Please Sign in or register to post replies

Write your reply to:

Draft