Forums

Find answers, ask questions, and connect with our
community all around the world.

Home Forum Omnis General Forum How to get a Datagrid’s Displayorder?

  • Andreas Pfeiffer

    Administrator
    January 26, 2026 at 8:06 am

    Hi Uwe,

    this works after the client has changed the display order. Switch on $::candragdisplayorder and then before using the test button, drag any of the columns so that you get a different display order. Then your test button will display the new display order.

    I think the $::displayorder was meant to either assign a different display order or to read it after it has been changed.

    The initial display order is determined by the order of the columns within the list that is assigned to the grid.

    I hope that makes sense.

    Best,

    Andreas

  • Uwe Smidt

    Member
    January 28, 2026 at 12:57 pm

    A display order is a display order is a display order…

    …no matter if changed or not!

    Hi Andreas, problem solved! Thank you for pointing me in the right direction!

    But I do think that the implementation of $displayOrder in Omnis is half-hearted: it should not matter if the order has been changed by the user or not – even the initial displayorder – which will always be ‘1,2,3,…,n’, is a displayorder and should be given by grid.$displayorder().

    In my app, I want to rearrange a 30 column grid by code (not user intervention)- so in order to do this, I first have to generate a string like ‘1,2,3,…,30’ to transform it to something like ‘1,17,6,3,…,30’. No big deal to generate this initial string of ‘1,2,3,…,30’, but I’d expect Omnis to always consider a DisplayOrder a DisplayOrder – not only after changing it.

    Best regards

    Uwe

Log in to reply.