EGL Development User Group

EGL Development User Group

EGL Development User Group

The EGL Development User Group is dedicated to sharing news, knowledge, and insights regarding the EGL language and Business Developer product. Consisting of IBMers, HCL, and users, this community collaborates to advance the EGL ecosystem.

 View Only
  • 1.  How to reset sort in datagrid

    Posted Wed January 16, 2013 04:09 AM
    I have a datagrid widget that I am populating based on a database extract. Using the inherent capabilities of the widget, I sort a column by selecting it. I now want to be able to undo the sort (ie set the data back to how it was originally displayed (where I populate the data by sorting on three keys). If I reload the data from the database, it stays in the same sort, thus my only current solution is to reload the page which isn't the cleanest solution. I imagine that there is some option within the datagrid that I can set to reset the sort, but I can't find anything. Without writing a ton of custom code, does anyone know of a solution for this?
    SystemAdmin


  • 2.  Re: How to reset sort in datagrid

    Posted Fri January 18, 2013 09:30 AM
    Thank you Ji Yong for the code snipet:

    for(i int from 1 to DataGrid.columns.getSize())
    DataGrid.columns[i].sortDirection = DataGridLib.SORT_NONE;
    end
    SystemAdmin


  • 3.  Re: How to reset sort in datagrid

    Posted Tue August 29, 2017 03:35 PM

                myAgrupamentoTributarioJoin01ArrayRec_ui.data = [];

                myAgrupamentoTributarioJoin01ArrayRec_ui.enableSorting = false;

                myAgrupamentoTributarioJoin01ArrayRec_ui.data = agrupamentoTributarioJoin01Array as any[];

                myAgrupamentoTributarioJoin01ArrayRec_ui.setStartRow(1);

                myAgrupamentoTributarioJoin01ArrayRec_ui.enableSorting = true;

     

    ojomenezes