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
Expand all | Collapse all

hide or delete text in DataGrid widget

  • 1.  hide or delete text in DataGrid widget

    Posted Wed August 12, 2015 01:28 AM

    Hello, 

    I want to hide the text in a datagridcolumn using some criteria. For example if it is zero, I want the cell from datagrid to be empty. Is that possible? 

    I am trying this but it doesn't work. table is used to fill "FillGridArray" grid 

       for(i int from 1 to table.getSize())

                    if (table[i].field == 0)              
                            table[i].field = null;
                            FillGridArray.appendElement(table[i]); 

                   end

       end

    michaeldefox


  • 2.  Re: hide or delete text in DataGrid widget

    Posted Wed August 12, 2015 02:06 AM

    Hi,

    you can do this with the Editor Behaviors of the Data Grid.

     

    function EditorBehaviors(grid DataGrid in, cell Widget in, rowData any in, rowIndex int in, column DataGridColumn in, value any in) returns(Widget)        if(column.name == "BPVKPREIS")            if(value == "0")               value = "";               ARTPREIS_label TextLabel{text = value};               cell.children =[ARTPREIS_label];            end        endend

    Kind Regards

    Marcel-D


  • 3.  Re: hide or delete text in DataGrid widget

    Posted Wed August 12, 2015 02:53 AM

    It gives me a warning about value that it may result in unpredictable results but  I skipped that and then deployment failed.

    michaeldefox


  • 4.  Re: hide or delete text in DataGrid widget

    Posted Wed August 12, 2015 02:59 AM

    Sorry,

    please try:

    if(value as string == "0")end

     

    Marcel-D


  • 5.  Re: hide or delete text in DataGrid widget

    Posted Wed August 12, 2015 03:02 AM

    Yes, it works fine! Thanks a lot.

    michaeldefox