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.  Show Column Sorter ticker when grid loads first time

    Posted Wed July 20, 2016 10:35 AM

    How do you show the column sort direction when I load the grid for the first time. I have a column that is showing data that is date descending and would like to give the user a visual of the "EglRuiDataGridSortDown" ticker next to the text when I load the grid. I'm using RBD 9.1.1 and the DataGrid widget.

     

    Thanks,

    Gadberry

    Gadberry


  • 2.  Re: Show Column Sorter ticker when grid loads first time

    Posted Wed July 20, 2016 11:18 AM

    Let me add to this...I have added this code to my DataGrid behavior but the indicator is not being set when the data loads.

     

    function ticketsDataGrid_format(grid DataGrid in, td Widget in, row any in, rowNumber int in, column DataGridColumn in)                 orderHeader ViewOrderHeader = ticketsDataGrid.data[rowNumber] as ViewOrderHeader;                                case (column.name)                        when ("weekEndingDate")                                column.sortDirection = DataGridLib.SORT_DOWN;                                weDate date = dateTimeHelper.convertDecimalToDate(orderHeader.weekEndingDate);                                td.innerHTML = weDate;                  end                       end

     

    Gadberry


  • 3.  Re: Show Column Sorter ticker when grid loads first time

    Posted Thu July 21, 2016 02:05 AM

    Hi Gadberry,

    After adding a sortdirection to a column you should re-render the grid.

    However, when you would attempt to re-render the grid in a behavior function you will find yourself in an endless loop (re-rendering will ultimately result in executing the behaviors.....),

    so.....try to set the sortdirection to the column you want to be sorted before setting the datagrid's data, or do a re-render of the DataGrid.

    Regards,

    Guus

    gweis